Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated SQL statement
Message
 
 
À
26/03/2008 19:21:33
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
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01305759
Message ID:
01306024
Vues:
11
>>>>Could it be that the definition of faster includes the time to transmit the resulting data set? In that case, if UNION ALL results in (say) 1,000,000 records while UNION results in only 5000 the transmission time for the 995000 extra records is more than the time to filter them?
>>>
>>>Yes, I think you nail the possible problem.
>>
>>When you use SELECT in VFP all tables included in that SELECT is transmitted to local computer. And that means ALL, no matter hat you select and what fields you select, whole tables are downloaded here. So the downloading time is not an option.
>>Using other backend like SQL Server that is a matter of "How smart SQL Optimizer is"
>>Just my opinion.
>
>I don't think that is accurate. When using a backend, the query is run on the backend and only the resultset is sent. I tried the "WHERE 1=0" on a table which has 16000 records (MySQL not SQL Server). You could see it returning the 16,000 records. Add the selection and it just blinked. Tried it again in reversed sequence (just in case there was caching going on) and got same result. Only the resultset is sent down the line.

Borislav was saying this for VFP tables, not SQL Server/MySQL. Did you try the same query with VFP big table on the network?

UPDATE. I re-read your message and I see your point.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform