Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Issue Related to execution time of sql query

Author  Topic 

anishrnair
Starting Member

1 Post

Posted - 2008-04-30 : 00:30:27
I have created 2 tables in a database which are mostly similar, the table1 will execute with more speed (take only less than or equal to 1 sec) but the table2 will take 4 or 5 secs to execute the query,moreover the similar datas was presented in both the tables. the eg:- query that i have executed is select max(c_code) from table1 and select max(c_code) from table2, the first one take less than 1 sec and the second one take more than 4 or 5 secs, also there is a procedure i hve written to update both the tables, and i got the time out error, if the table1 alone is updated using the procedure it is OK but the table2 alone is updated using the procedure the time out error will be shown, pls reply the reason for this problem as early as possible, it will be a grateful if anybody reply for this trouble?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-30 : 02:31:38
Can you comapre the two tables and see what all indexes they have?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-30 : 02:37:15
Also compare execution plans. Maybe you are missing statistics foe one table?




E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -