Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible to optimize subquery??
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00237460
Message ID:
00237461
Views:
12
>Hi,
>
>I have a table 'person' with 11000 records and a small temporary dbf 'localTest' with 9 records.
>
>The query below takes 10(!) seconds to perform and the resultset is 65 records. The SET DELETED setting does not change this time, nor if I have an index on UPPER(id) in 'localTest'. There is an index on UPPER(person.company_id).
>
>SELECT person.firstname ;
> FROM person ;
> WHERE UPPER(person.company_id) IN (SELECT UPPER(id) FROM localTest)
>
>Does anyone know how this query can be optimized so that it uses Rushmore, or is this not possible??
>
>
>Klas Nygren
Klas,

Is it quicker to join the files?

SELECT Person.FirstName FROM Person, LocalTest WHERE Person.Company_id = LocalTest.Id
regards

Ian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform