Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding almost duplicates from a UNION
Message
From
30/06/2001 16:34:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00524751
Message ID:
00525633
Views:
20
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform