Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this one to many SQL line be made faster?
Message
De
29/01/2004 03:48:38
 
 
À
29/01/2004 03:34:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00871681
Message ID:
00871687
Vues:
12
I'd try a similar variation
Select b.cfk1, b.cfk2, a.ctype;
	FROM  vcf!many b ;
	INNER Join vcf!one a ON  b.cfk1 = a.cid;
        WHERE (b.namount1 + b.namount2 <> 0) or ;
              (b.namount3 <> 0 and a.ctype$"F8" ) ;
	GROUP By b.cfk1, b.cfk2
which should use short circuiting a bit better.
Perhaps an index on namount1 + namount2 in vcf!one
speeds things up - check the optimizing results,
since I am not sure about <> being optimized.
If it isn't, try
WHERE (b.namount1 + b.namount2 > 0) or ;
            (b.namount1 + b.namount2 < 0) or ;
            (b.namount3 <> 0 and a.ctype$"F8" ) ;
HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform