I have a table that's about 2Gb in size and information is constantly being written to it. I need to run a little script on the hour that searchs for a specific string in a specific column but due to the size I though I'd take a sample of maybe the last 100 entries or something.
I'm looking for a way to easily access the last entries added to the table. something like the TOP command but the opposite :)
Is there an easy way of doing this that I'm missing?
Ahh, yeah, I didn't think of that. All the indexes in the word created on that table except the right one :)
Just so that I'm not wasting my time here...
I'm trying to lookat the last 50 lines entered to the table on every hour and search them for a specific string. So a Select TOP 100 * from yourTable order by DatetimeCol Desc where string LIKE '%TEXT%' and someone combine that into a count() to test if I get a return or not.
Does that make any sense (getting married in 2 days...difficult to concentrate! :)