Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How my application is so slow with 30,000 records?
Message
 
To
17/04/1998 23:04:13
Fernando España
Alta Tecnologia En Informatica
Guatemala, Guatemala
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00093105
Message ID:
00093106
Views:
30
"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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform