Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help to Speed up SQL
Message
 
 
À
13/03/2002 15:15:59
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:
00632365
Vues:
16
My point is that the main reason why your query is slow that it has to process all records in the table. The memory settings could also affect the query speed but it isn't the main reason for slowness.

>Now you may have me confused again.
>Someone else pointed out that ForeGround buffer and BackGround buffer size come into play when I switch between applications. So I equalized ForeGround and BackGround buffers by reducing the size of ForeGround and increasing size of BackGround. This GREATLY increased the time that the query took to finish (but it ran at the same time in ForeGround and BackGround).
>Doesn't that indicate that memory is limiting the speed?
>
>
>>You're right, it's slow because it has to process ALL records to calculate SUM() for ALL PK1_Emp_Flag groups. The memory isn't a factor here.
>>
>>>I think I've figured out that this is where a big part of my problem is. Not enough memory.
>>>The basic design of the query just uses too much. The sum(t2.field) on so many records uses too much to keep it fast.
>>>When I applied different filters to reduce the # of records from t1 the query ran fast.
>>>
>>>I now have to redesign the data so that I can permanently quit checking to make sure sum(t2.amount) = t1.amount.
>>>
>>>Thanks to all who helped.
>>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform