Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How my application is so slow with 30,000 records?
Message
 
À
17/04/1998 23:04:13
Fernando España
Alta Tecnologia En Informatica
Guatemala, Guatemala
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00093105
Message ID:
00093106
Vues:
31
"when i need sum the amount of the child table for each record in the primary table"

Fernando,

Are you using a program to do this or a query? A program will have a slower performance if you have to go to each record on the parent table and check for its links on the child table. But if you use an SQL statement performance can be sped up very nicely. I would do something like this:

SELECT parentable.client,SUM(childtable.moneyfield) FROM parentable,childtable GROUP BY parentable.client

You could also use the COUNT(*) command to actually count the number of transactions that generated the SUM() calculation.

HTH




>I have a application and it works :
>
>have one primary table with 1200 people Information
>and I have aprox. 30,000 records in a child table and is very
>slow consult the child table with a relation, when i need sum the
>amount of the child table for each record in the primary table, the system is very slow, i have index on IDCliente in my primary table and
>i have an Index in my child table Idcliente for make a relation and the relation works ok, but my sysetm is so slow, what I'm doing bad?
>how can a give more speed to my application?
>
>Sorry for my English
For every bug fixed, there is a bigger bug not yet discovered.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform