Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL question
Message
De
15/02/2017 16:47:54
 
 
À
14/02/2017 13:48:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01647876
Message ID:
01648004
Vues:
75
>>Yes, the "null" method blew my mind when I first encountered it (in an example much more complex, using a join Select). Using it has trimmed 80% off the SQL times (against SQL Server 2014) in our large queries, compared to IN SELECT. SQL Server, for one, produces the same Query Plan for EXISTS and IN SELECT, in case anyone is wondering.
>>
>
>In SQL Server, why wouldn't you use the EXCEPT keyword?
>
>
>SELECT iID FROM Table2
>EXCEPT
>SELECT iID FROM Table1
>
>
>http://www.tomorrowssolutionsllc.com/Articles/Combining%20Query%20Results.pdf
>
>Tamar

If you are OK with distinct values being returned, EXCEPT can be as fast as left join null on MSSQL,but apparently not in PostGreSQL.

In the cases where we used it, we are getting rows that will feed a report of one kind or another, so EXCEPT isn't an option. I like the expressiveness, for sure.

Hank
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform