Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help to Speed up SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00629818
Message ID:
00631691
Vues:
25
Hi Bill,

>If I understand you right, the TRUE time that my query takes is the first time I run it.

Yes.

>Switching to a different application (while VFP is waiting at the command window) switches VFP to background buffer and throws out the foreground information.

VFP is reducing its buffer from the foreground size to the background size. Since the background buffer is usually smaller, VFP has to throw out everything that doesn't fit in.

>I just test that idea, by equalizing both foreground and background buffer, and sure enough it ran the query at the same speed each time.

Now that's great, at least for me. *bg*

>So the speed of my query is a function of the design?

Basically, yes. There might be alternatives, depending on the application, but they probably require a different design. For example, you could use a trigger on table2 to upate a counter in table1. If you then had an index on that counter field, you could run an optimized query that would be faster.

Christof
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform