Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing Query
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00578767
Message ID:
00578873
Vues:
37
This message has been marked as a message which has helped to the initial question of the thread.
>>>>Just for a fun can you try WHERE instead of JOIN?
>>>>BTW, How many records are in the temp table and how big result set do you expect?
>>>
>>>I'll try at home with the test table. The temp table has 110 records. The main table has 5mln records. I think, the resulting set would be huge, may be 800000 recs. This is just a plain test, the live query uses 7 joins to tables, each of them has ~3-5mln. recs... :(
>>>
>>
>>Just a guess, but it seems to me that foxpro doesn't have any reason to use index for temp table. It would rather scan it and use index on main table to get the related records. You should find some other way to limit the number of records in the result set.
>
>
>What could be the other way? BTW, I've checked where idea, and the result is none for both tables. In my criteria form I construct where condition as a seria of INLIST command, if number of selected items less than max_number. I definied max_number as 72. If user selects more than 72 items, I use temp table idea...
>

Hi Nadya,

I cannot help much w/o more info about data you're working with. According to your numbers one criteria generates 80,000 records wich is to much already.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform