Re: Cannot set CDX index on DBF file from C#
- From: "Don K" <abc@xxxxx>
- Date: Mon, 23 Jan 2006 22:52:00 -0000
Cindy,
Following your advice, I have had a good deal of success with speeding up
SQL queries from C# against my large foxpro DBF/CDX table.
I have a field called STOREDATE which is a Date field (surprise, surprise)
and I have an index in the CDX file whose expression is just STOREDATE, and
so SQL queries with clause WHERE STOREDATE = {^ some date} are now going
lightening fast - from 30 seconds plus, down to less than 0.5 of a second
to return 300 hundred records from over 1 million (still under 1 second to
do a short BETWEEN) which is a great improvement!
However, my other index is a combined expression, and is as slow as ever.
Expression in this second index is STORENAME + DTOS(STOREDATE) + STOREVALUE.
STORENAME and STOREVALUE are character fields. So if I run a query such as
SELECT * FROM STORE WHERE STORENAME = 'SPEED' AND STOREDATE ={^2006/01/01}
it continues to run without apparently using the index. Running this SQL
without the AND STOREDATE = {^2006/01/01} clause also runs slow.
>From your last post, it occurs to me that I might only be able to use WHERE
clauses based on the whole expression, not just the 'most significant'
elements (not so ueseful), or perhaps the DTOS is causing problems. Any
thoughts?
Don
.
- Follow-Ups:
- Re: Cannot set CDX index on DBF file from C#
- From: Cindy Winegarden
- Re: Cannot set CDX index on DBF file from C#
- From: Jay B
- Re: Cannot set CDX index on DBF file from C#
- References:
- Cannot set CDX index on DBF file from C#
- From: Don K
- Re: Cannot set CDX index on DBF file from C#
- From: Cindy Winegarden
- Re: Cannot set CDX index on DBF file from C#
- From: Don K
- Re: Cannot set CDX index on DBF file from C#
- From: Cindy Winegarden
- Cannot set CDX index on DBF file from C#
- Prev by Date: Re: Simple tutorial example, very simple.
- Next by Date: Re: Simple tutorial example, very simple.
- Previous by thread: Re: Cannot set CDX index on DBF file from C#
- Next by thread: Re: Cannot set CDX index on DBF file from C#
- Index(es):