Information générale
Catégorie:
Codage, syntaxe et commandes
I believe you are incorrect. The subquery is run once and the main query is then run once against the results of the subquery. Test it to make sure. Beyond that, $5 is a bargain.
>It is my understanding that the select subquery in parentheses on table1 would run once for every record selected in the outer select from table2. If that is in fact true, even though your alternative may be easier to code or more clear to read, it would be way less efficient (and therefore slower) than a join. By the way, the fact that Bret and I work together has nothing to do with it. Honest (as Bret slips me $5). I just wanted to mention that for you to consider.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement