Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this one to many SQL line be made faster?
Message
From
29/01/2004 03:48:38
 
 
To
29/01/2004 03:34:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00871681
Message ID:
00871687
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform