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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored procedure consistently slower

Author  Topic 

eorlando
Starting Member

2 Posts

Posted - 2001-03-07 : 14:37:25
I am just beginning to learn stored procedures. My website uses SQL 2000 with a database of approx 500,000 records at 2GB total size. Before I change all the code on the site, I ran some tests to see if there is really a speed increase with stored procedures. Based on the simple code I've written, I see no speed advantage. Perhaps someone can help. Did I code the procedure wrong?

Below is a sample. The stored proc code is the exact code used in the second T-SQL statement. Both return the same recordset so I know that is not a problem. However, check the execution times. I've run this and consistently get similar results.


get_users (Records=100, Time=3953ms)
SQL = EXECUTE search_test2

get_users (Records=100, Time=2813ms)
SQL = SELECT top 100 * FROM items WHERE category=230 and status=1

Any help with this?

Thanks

Ed


   

- Advertisement -