Bonjour,
j'aimerai savoir pourquoi le temps de réponse d'une même requete diffère (largement) selon SQL SERVER 2003 ou ACCESS 2003.
Avec SQL, j'ai un bout de code qui demande 8 secondes.
Avec ACCESS, je peux attendre parfois plus de 10 minutes.
Voici mon code en SQL
Voici mon code en ACCESS :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 SELECT TOP 5 a.TdProdDate, b.E_BALANCE_AMT, b.E_CUSTOMER_NAME, c.P_CACS_STATE_CODE FROM (table1 as a LEFT JOIN table2 as b ON (a.C_ACCOUNT_NUMBER = b.E_ACCT_NUM) AND (a.TdProdDate = b.TdProdDate)) LEFT JOIN table3 as c ON (a.C_ACCOUNT_NUMBER = c.P_ACCT_NUM) AND (a.TdProdDate = c.TdProdDate) WHERE C_ACTIVITY_DATE = '20101201' ORDER BY NewID()
Pourquoi, et surtout comment améliorer cela s'il vous plait ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 SELECT TOP 5 a.TdProdDate, b.E_BALANCE_AMT, b.E_CUSTOMER_NAME, c.P_CACS_STATE_CODE FROM (table1 as a LEFT JOIN table2 as b ON (a.C_ACCOUNT_NUMBER = b.E_ACCT_NUM) AND (a.TdProdDate = b.TdProdDate)) LEFT JOIN table3 as c ON (a.C_ACCOUNT_NUMBER = c.P_ACCT_NUM) AND (a.TdProdDate = c.TdProdDate) WHERE C_ACTIVITY_DATE = #12/01/2010# ORDER BY Rnd([TdProdDate])
Partager