P
Peter
Hello
I have an Access database with table "Lines" with 200000 rows
When I run the query:
"SELECT TOP 100 * FROM Lines"
it flies....
However
"SELECT TOP 100 * FROM Lines ORDER BY LineNumber"
takes ages.
There is an index on LineNumber, so why does this make a difference?
How can I persuade SQL to use my index.
Tried the same on MSDE... There it is also slow. Query analyser tells me it
spends most of its time sorting the table (could have guessed that one...).
Suggestions are very welcome.
Peter.
I have an Access database with table "Lines" with 200000 rows
When I run the query:
"SELECT TOP 100 * FROM Lines"
it flies....
However
"SELECT TOP 100 * FROM Lines ORDER BY LineNumber"
takes ages.
There is an index on LineNumber, so why does this make a difference?
How can I persuade SQL to use my index.
Tried the same on MSDE... There it is also slow. Query analyser tells me it
spends most of its time sorting the table (could have guessed that one...).
Suggestions are very welcome.
Peter.