Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimization of a JOIN
Message
De
04/03/2008 14:50:17
Walter Meester
HoogkarspelPays-Bas
 
 
À
04/03/2008 14:27:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01298581
Message ID:
01298594
Vues:
30
It is using those indexes for the join. Only filters (in the where clause) are mentioned in the rushmore optimization level.

It seems optimization is fine for those queries.

BTW, get rid off the deleted tag. It does not speed up your query (except in very specific circumstances). Full optimization does not mean that it is most optimal.

Walter,


>I am using SQL ShowPlan to investigate the performance of the following SQL SELECT:
>
>SELECT ManifestHdr.dManifest, ManifestHdr.lOpen, ManifestHdr.iQty,;
> COUNT(ManifestDtl.iPk) AS nScanned, ManifestHdr.iPk,
> Manifesthdr.iFkSystems;
> FROM SN!ManifestHdr;
> LEFT OUTER JOIN SN!ManifestGrp;
> ON ManifestGrp.iFkManHdr = ManifestHdr.iPk;
> LEFT OUTER JOIN SN!ManifestDtl;
> ON ManifestDtl.iFkManGrp = ManifestGrp.iPk;
> WHERE ManifestHdr.iFkSystems = ?vp_ManifestHdr_iFkSystems;
> GROUP BY ManifestHdr.iPk;
> ORDER BY ManifestHdr.dManifest
>
>I get the following output from SYS(3054,11)
>
>Using index tag Ifksystems to rushmore optimize table manifesthdr
>Using index tag Deleted to rushmore optimize table manifesthdr
>Rushmore optimization level for table manifesthdr: full
>Rushmore optimization level for table manifestgrp: none
>Rushmore optimization level for table manifestdtl: none
>Joining table manifesthdr and table manifestgrp using index tag Ifkmanhdr
>Joining intermediate result and table manifestdtl using index tag Ifkmangrp
>
>Why are manifestgrp and manifestdtl tables not optimized if I have indexes on:
>ManifestGrp.iFkManHdr and
>ManifestDtl.iFkManGrp ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform