Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which of the following is better Optimized
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00307908
Message ID:
00307914
Vues:
12
>Hi Everyone,
>
>Is query #1 as optimized as query #2:
>
>QUERY #1
>SELECT one,two FROM table1,table2 where table1.id = table2.id
>
>QUERY #2
>SELECT one,two FROM table1 INNER JOIN table2 ON table2.id = table1.id
>
>Or are they both equally as fast? I'm using VFP 5.0.
>
>I'm not concerned about which one is *SQL* correct... just speed.
>
>THANKS!

Shawn,

The optimization is controlled by the indexes that exist in both of them. They should be nearly equal in time required although at any one run one of them may out perform the other depending on the machine status at the time of the run. IOW, they are equivalent in terms of the results gotten adn the time it will take to get those results.

That said, I would suggest the more "correct" one using the JOIN syntax and leave the WHERE clause for filtering the result set.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform