M
Mark Olbert
Why does the following simple query against an SqlServer2005 table in an ASPNET2 website returning less than 10 rows:
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1
take no time at all (less than 1 second)
yet the following sorted query against the same table (same number of returned rows):
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1 ORDER BY seq_num
takes almost 20 seconds?
- Mark
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1
take no time at all (less than 1 second)
yet the following sorted query against the same table (same number of returned rows):
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1 ORDER BY seq_num
takes almost 20 seconds?
- Mark