Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select with GROUP BY - much slower than without
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01110065
Message ID:
01110258
Vues:
14
>>I will use this in the future, but for this particular function I better live it as is, because I have tcFilter as a parameter and I usually pass filter with the table name spelled out.
>
>STRTRAN(tcFilter, "Trans_employees_queues.", "teq.")
>
>
>>I also changed my original select to
>>
>>text TO lcSQLStr NOSHOW TEXTMERGE PRETEXT 7
>>	SELECT Trans.cTrans_pk, Usgrlink.cUsGrlink_pk, ;
>>		Users.cUserID, Trans.yCurrent_balance_amount ;
>>	FROM TRANS INNER JOIN Trans_employees_queues ;
>>	ON Trans.cTrans_pk = Trans_employees_queues.cTrans_fk ;
>>	INNER JOIN UsGrLink ON Usgrlink.cUsgrlink_pk IN ;
>>	(Trans_employees_queues.cCommission_owner_usgrlink_fk, ;
>>	Trans_employees_queues.cUsgrlink_fk, ;
>>	Trans_employees_queues.cSupervisor_review_usgrlink_fk) ;
>>	INNER JOIN USERS ON Users.iID = Usgrlink.iUserID ;
>>	INNER JOIN Employee_queue_schedules ;
>>	ON Trans_employees_queues.cTrans_employees_queues_pk = ;
>>	Employee_queue_schedules.cTrans_employees_queues_fk ;
>>	WHERE <<m.lcFilter>>
>>ENDTEXT
>>
>>
>>in order to eliminate UNION. However, I do not see much improvement. May be I better change this to two separate select statements?
>
>You have to try to find out if it'll be faster.

Thanks, I'll try to run some tests, but so far they were non conclusive.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform