Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble optimizing a query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00333643
Message ID:
00333702
Vues:
15
Could you post the query? It'll be easier to give you specific help.

>Thanks for the reply.
>
>>I'm far from an expert, but i think if it's a complex join, you need to index the same way. ex: Join a..b on a.f1+a.f2 = b.f1+b.f2 you need to index on f1+f2.
>
>It isn't a complex expression, the join is a.ctrct_no = b.ctrct_no and the index for each is simply ctrct_no, sounded like it was optimized to me. I tried the sys(3054,1) call before opening the view (thanks for that tip, didn't know that one) and VFP reported that the Rushmore optimation level for each table was none. I'm confused. The join condition is the same as the index tag which is the same as the field used in the index.
>
>>If you already know this, it sounds dumb, but I learned the hard way: When creating the index, do NOT use the name.field convention - it'll make the index not optimizable. I took the table-name out of the index, and the optimization level of my query went from none to full. (use sys(3054,1) to enable the output of optimization levels, it's a useful diagnostic)
>
>The index does NOT contain the table name, verified that with a SYS(14) call. Arrrrggggghhhhh.
Peter Franz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform