Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple VFP query, no optimization
Message
From
10/11/2000 16:31:11
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
10/11/2000 16:27:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00440476
Message ID:
00440482
Views:
17
Do you have a filter on the index? Filtered indexes cannot be optimized. I can't think of anything else off the top of my head.

HTH,
Jonathan

>I've got the simplest of queries that I cannot get to optimize. Table pastinvoices has a regular index with expression custID+poNum. The following two queries (hard coded for example only) return the proper invoice, but takes about 3 seconds. Running a query on the primary key (invnum), returns the record in .03 seconds.
>
>Here they are:
>
>select * from pastinvoices as pinv where pinv.custID = "149" and ;
> pinv.poNum = "143619" into cursor cp
>
>-- or --
>
>select * from pastinvoices as pinv where (pinv.custID + pinv.ponum = ;
> "149 143619 ") into cursor cp && padded on right in act of desperation
>
>My where clause is identical to one of my index expressions. SET OPTIMIZE = ON. Where is my shortcoming?
>
>About to revert to INDEXSEEK and manually build cursor,
Previous
Reply
Map
View

Click here to load this message in the networking platform