Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query question

Status
Not open for further replies.

pd123

Programmer
May 22, 2001
48
GB
I have a query which pulls things from many tables.

If I do a select top 269 from aaa, bbb, etc it returns the data back in about 2 seconds.

If I do a select top 270 from aaa, bbb, etc it returns the data back in about 8 seconds.

Does anybody know why the query takes 6 seconds longer just to return 1 more record in the query? If so, is there any db runtime value I can adjust to speed up the response time?

Many thanks,
pd123
 
Yes, tried that but makes no difference unfortunately.

Thanks anyway.
 
Behaves in exactly the same manner.

set rowcount 269 - query takes 2 seconds

set rowcount 270 - query takes 8 seconds
 
Yes, same query plan.

If I set showplan_text on and run both queries, the same execution paths are returned.

The only difference is one more record !

 
All the indexes are the same - it's in the same query analyser window in fact.

I'll have a dig through the documentation to see if anything seems relevant.

Thanks for you help anyway.

Regards,
pd123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top