Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in SQL Union
Message
 
 
À
01/03/2007 02:02:35
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01199863
Message ID:
01199921
Vues:
31
Hi Neil,

FYI, the SQL way is
where table3.f1 IS NULL ;
>I had to alter the code, the union all as it was giving duplicates, I also removed the DISTINCTS as per sergey's suggestion this resulted in a significant difference.
>
>Rushmore optimization was NONE on all
>
>Our code 209 recs 2.12 seconds
>Your code 209 recs 1.13 (after removing UNION ALL)
>Your code 209 recs 0.75 (after removing the DISTINCTS) not bad improvement
>
>The final code is as follows:-
>
>
>select table1.f1 from table1 left join table3 on table1.f1 = table3.f1 ;
>where ISNULL(table3.f1) ;
>union ;
>select table2.f1 from table2 left join table3 on table2.f1 = table3.f1 ;
>where ISNULL(table3.f1) ;
>order by 1 into cursor curOrphans nofilter
>
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform