Can someone explain why SqlServer2005 returns the following query very quickly (i.e., under 1 second):
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1
but takes almost 20 seconds to return the following query:
SELECT link_text, idnum, ts FROM bd_content WHERE parent_id = 0 AND idnum <> 1 ORDER BY seq_num
The number of records in both cases is trivial, i.e., less than 10.