Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL speed difference
Message
De
15/08/1997 14:49:11
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
12/08/1997 05:26:40
Siu-Hung Lai
The Hong Kong University of Sci. & Tech.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00044159
Message ID:
00045011
Vues:
27
>I have 6 SQL command in a prg to retrive data into a cursor from 3 tables(with 9000,180,000 and 340,000 records). When I run the prg from project manager, it takes 37 secs. If I run it in the Form.Load(), it takes 60 secs. What is the possible cause?
>
>TIA
>
>S H

If you have set deleted on then you should definitely have an index on DELETED(). It doesn't matter whether or not there are any deleted records, VFP still has to check the data. This can make a big difference.

The next thing to do is check for rushmore optimization. If you have VFP 5 you are in luck with SYS(3054)
Run SYS(3054, 1) to display optimization. Then run your query from the command window to see what optimization is occuring.

Make sure you have appropriate indexes that match each of the conditions of the join. I would not be happy if queries on three tables took any longer that 5 seconds. It sounds to me like there is plenty of room for optimization. SYS(3054) can be very useful as you modify your view join condition and indexes.

Bob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform