Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by question
Message
De
12/07/2005 12:52:55
 
 
À
12/07/2005 10:02:15
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01031432
Message ID:
01031764
Vues:
14
Why is that? I've always been taught, when I've worked with Oracle and/or SQL Server gurus to use correlated sub-queries.

Here's a quote I found looking up the subject on Google:

"It may indeed be convenient to imagine a correlated subquery as being "evaluated" or "executed" once for each row of the outer query; do not, however, be misled into thinking that the database optimizer actually executes it in that fashion, because this will lead you to believe that it's not very efficient, when in fact most optimizers will process a correlated subquery very efficiently, as a join."

PF



> No, see erics reply. A self join would do also. I'm not sure about performance differences though..
>
>Yeah, unless you're talking about a small table, one should always look an alterative to a correlated subquery - a self join or even derived table will outperform a correlated subquery.
>
>
>Kevin

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform