Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 OPTION (FAST 1) anything but...

Author  Topic 

NewMedia42
Starting Member

35 Posts

Posted - 2004-05-19 : 19:48:56
I just wanted to mention this and see if anyone else had experienced anything similar.

I have a query which I run that doesn't do anything to special, just something along the lines of:

select top 1 * from [table] where Value=1234

It's basically guaranteed to return one value, and I was interested in trying to tweak it's performance, so I played around with using Rowcount vs. top, but nothing made a major difference. I did however add OPTION (FAST 1), which I wouldn't think would hurt anything and might speed it up marginally, but the result was is slowed it down dramatically - probably on the factor of 10x slower. I removed it, and it went back to normal - but I was very surprised at this result.

Anyway, just wanted to share this with everyone, and once again it illustrates why it's important to benchmark all optimizations... :)
   

- Advertisement -