Hello Everyone,
I have an query in a stored procedure consisting of 10 inner joins including with two table variables and one hash temp table.
The query output is 7500 rows. But the stored procedure takes around 26 seconds to execute and display the 7500 rows.
There is primary key for the temp table. All the tables have indexes on them.
Can anyone suggest how to improve the performance of the query ?
The client statistics from aree given below.
Client Execution Time 19:30:44 19:30:21
Query Profile Statistics
Number of INSERT, DELETE and UPDATE statements 8 0 4.0000
Rows affected by INSERT, DELETE, or UPDATE statements 0 0 0.0000
Number of SELECT statements 10 0 5.0000
Rows returned by SELECT statements 4 0 2.0000
Number of transactions 8 0 4.0000
Network Statistics
Number of server roundtrips 3 3 3.0000
TDS packets sent from client 5 3 4.0000
TDS packets received from server 570 3 286.5000
Bytes sent from client 10144 450 5297.0000
Bytes received from server 1896320 800 948560.0000
Time Statistics
Client processing time 614 14 314.0000
Total execution time 740 119 429.5000
Wait time on server replies 126 105 115.5000
Regards
Gautam S
Gautam S