Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query Not Optimized
Message
 
 
À
18/11/2011 15:41:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01529257
Message ID:
01529262
Vues:
47
>I have a table INVTMFHD with separate index tags on (among others) fields PARTMFGR and MFGR_PT_NO. If I do....
>lcMfgr = "somevalue"
>lcPtNo = "some value"
>
>SELECT * FROM invtmfhd WHERE partmfgr = lcMfgr
>-----> Using index tag Partmfgr to rushmore optimize table invtmfhd
>
>SELECT * FROM invtmfhd WHERE mfgr_pt_no = lcPtNo
>-----> Using index tag Mfgr_pt_no to rushmore optiomize table invtmfhd
>
>SELECT * FROM invtmfhd WHERE mfgr_pt_no = lcPtNo AND partmfgr = lcMfgr
>----->Using index tag Mfgr_pt_no to rushmore optimize table invtmfhd
>----->Using index tag Partmfgr rushmore optimize table invtmfhd
>
>But if I try to JOIN I get
>SELECT invtmfhd.uniqmfgrhd,crsTemp1.partmfgr,crsTemp1.mfgr_pt_no ;
>  FROM invtmfhd;
>    JOIN crsTemp1 ON invtmfhd.partmfgr = crsTemp1.partmfgr;
>                          AND invtmfhd.mfgr_pt_no=crsTemp1.mfgr_pt_no;
>  INTO CURSOR crsTemp2
>
>-----> Rushmore optimization level for table invtmfhd: none
>-----> Rushmore optimization level for intermediate result: none
>
>Can somebody please educate me on why the tags don't get referenced and how I might be able optimize the query?
>
>Thanks to all..........Rich

This display does not show up indexes used in JOIN conditions, only indexes used in WHERE. In other words, most likely these indexes are used, but you will not get this information displayed by SYS(3054).
Try using SYS(3054,11).
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform