J
Jochen L. Kaiser
Hi,
I have a table "tab1" with 200.000 records and an indexed
field "field1" in a ms access2000 database. (secondary index)
There are a couple of curious things:
- Querying "select * from tab1 order by field1"
from within access is quite fast. (So the index seems to work here)
Adding a top clause like
"select top 10 * from tab1 order by field1"
seems to ignore the index, so the query is very slow
- Executing the query from ADO (serverside cursor)
"select * from tab1 order by field1"
takes a long time - with and without the top clause - so
you can assume that the index has not been used.
What is wrong here? Do I miss something?
What con I do speed up getting the top n records of this
query using ADO?
Thanks,
-joe
I have a table "tab1" with 200.000 records and an indexed
field "field1" in a ms access2000 database. (secondary index)
There are a couple of curious things:
- Querying "select * from tab1 order by field1"
from within access is quite fast. (So the index seems to work here)
Adding a top clause like
"select top 10 * from tab1 order by field1"
seems to ignore the index, so the query is very slow
- Executing the query from ADO (serverside cursor)
"select * from tab1 order by field1"
takes a long time - with and without the top clause - so
you can assume that the index has not been used.
What is wrong here? Do I miss something?
What con I do speed up getting the top n records of this
query using ADO?
Thanks,
-joe