We have a database DEV on a Win2k server, and we backed it up and restored it on the same server as TEST. Now if we run the following query:
Select a.* from ovrn_nielsen_qtrh_final a where a.CALL_LETTER_ID=173329 and a.NLSN_FIN_QTR_DATE>='9/14/2005 8:00:00 PM' and a.NLSN_FIN_QTR_DATE<='9/14/2005 9:00:00 PM'
On TEST, it takes 10 seconds, but on DEV it takes 27 seconds, and our application users get 'timeout' error. I have updated the statistics, but it does not make any difference.
The structure of the table is:
NLSN_FIN_QTR_ID int 4
NLSN_FIN_QTR_DATE date/time 8
NLSN_FIN_QTR_TIME date/time 8
NLSN_FIN_QTR_HUT float 8
NLSN_FIN_QTR_RAT float 8
NLSN_FIN_QTR_SHARE float 8
CALL_LETTER_ID int 4
And the only index on this table is a clustered index on NLSN_FIN_QTR_ID.
Is there anything else I can do?
Besides, the users need insert 10,000 rows in the table everyday soon. What I am thinking about is: drop the index before insert, and recreate it after. Is there anything else I can do to improve the performance of insert?
Thank you very much.
Select a.* from ovrn_nielsen_qtrh_final a where a.CALL_LETTER_ID=173329 and a.NLSN_FIN_QTR_DATE>='9/14/2005 8:00:00 PM' and a.NLSN_FIN_QTR_DATE<='9/14/2005 9:00:00 PM'
On TEST, it takes 10 seconds, but on DEV it takes 27 seconds, and our application users get 'timeout' error. I have updated the statistics, but it does not make any difference.
The structure of the table is:
NLSN_FIN_QTR_ID int 4
NLSN_FIN_QTR_DATE date/time 8
NLSN_FIN_QTR_TIME date/time 8
NLSN_FIN_QTR_HUT float 8
NLSN_FIN_QTR_RAT float 8
NLSN_FIN_QTR_SHARE float 8
CALL_LETTER_ID int 4
And the only index on this table is a clustered index on NLSN_FIN_QTR_ID.
Is there anything else I can do?
Besides, the users need insert 10,000 rows in the table everyday soon. What I am thinking about is: drop the index before insert, and recreate it after. Is there anything else I can do to improve the performance of insert?
Thank you very much.