Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing query with filter
Message
From
25/03/2001 10:25:02
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00488364
Message ID:
00488440
Views:
8
Hi Michael,

Don't see how you can revise the select to *accommodate* the new index, but two options are:

1) Add another index that is exactly like your old one was;
2) Get rid of the filter in the index and put the test into a WHERE clause.

It might be an idea to suggest to the client that any indexes *you* set should NOT be changed - s/he should add new indexes when tempted to do so. While SELECT may not be too problematic (except for response time), a change to an index *could* have dramatic effects on program logic.

Good luck,

JimN

>I have a select statement which USED to be optimized, but the client added a filter to the index expression. How do I modify my SELECT to accommodate the filter?
>
>The index is UPPER(Job.External) and the filter is .NOT. EMPTY(External)
>
>My old select is something like:
>SELECT blah blah blah FROM LinkJob INNER JOIN External ;
>ON LinkJob.External = UPPER(Job.External) ;
>blah blah blah
>INTO CURSOR TQuery
>
>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform