Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sudden slow database access
Message
De
19/01/2015 12:22:45
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
19/01/2015 11:40:31
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 SP2
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01613560
Message ID:
01613915
Vues:
66
>Dragan, Thanks.
>
>This is just an "aside" to the main conversation. I am trying to understand your post.
>
>Are you telling me that if my views had no joins and instead I simply pulled each tables data that is needed separately, then using cursors somehow end up with the same data as I was pulling with a view that contained joins, I would be a lot faster?
>
>If that is what you are saying, I understand. In the testing I have done I have noticed, I can pull a million records from a table with no joins in just a few seconds. Add even the simplest join (on indexed fields) and it will almost always, if not always, be many times slower.

Well, yes, the situation I had was that there was one huge table to be joined to 2-3 small lookups. When I pulled those 200 records out of 500000 and then joined, it was about 20 times faster. In some cases it works even with SQL - as the fields in the lookups generally tend to be wide name fields, bringing them repeatedly rather increases the bulk of the result set. The speedup may or may not be as dramatic, depending on your server, network etc.

Generally, pulling the relevant parts of the lookup separately means that each of its records goes through the wire only once; if joined, as many times as needed.

>All that said, with 1000 views and 80% of those views having at least 1 join, that would seem to be an impossible task.

Ouch. Well... you may take care of the worst offenders first, a few at a time.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform