"order by" slow on indexed field
From: Jochen L. Kaiser (jlkaiser_at_starcon.de)
Date: 04/20/04
- Next message: Fool: "Find Method - How to compare only a part of the string?"
- Previous message: Jerry Pisk: "Re: Bulk Inserts - High Speed"
- Next in thread: Stephen Howe: "Re: "order by" slow on indexed field"
- Reply: Stephen Howe: "Re: "order by" slow on indexed field"
- Messages sorted by: [ date ] [ thread ]
Date: 20 Apr 2004 00:54:27 -0700
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
- Next message: Fool: "Find Method - How to compare only a part of the string?"
- Previous message: Jerry Pisk: "Re: Bulk Inserts - High Speed"
- Next in thread: Stephen Howe: "Re: "order by" slow on indexed field"
- Reply: Stephen Howe: "Re: "order by" slow on indexed field"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|