Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excluding almost duplicates from a UNION
Message
De
30/06/2001 16:34:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00524751
Message ID:
00525633
Vues:
21
You should test for speed. Sometimes separating a SQL - SELECT command into several commands is much faster. For instance, I had a 9-table SELECT, which took me 50 seconds over the network. I separated in in several commands, joining first two tables, then a third, then a fourth, etc., and execution time dropped from 50 seconds to 2 seconds.

Hilmar.

Separate statements can help debugging, since you deal with shorter pieces at a time. Once you found the problem, you can combine the pieces again, if you think this will execute faster.

>Hmmmm... Well, maybe for debugging it helps to do it twice, but speed is important and it seems that having it in one select would be faster.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform