![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Both databases are identical, the servers runs on the same machine (Pentium 2,8 Ghz, 2 GB RAM) with only one client connected. On forums I've read that Microsoft doesn't recommend using server side cursors on sql 2005 but is there any way to increase performance to some acceptable level? |
#3
| |||
| |||
|
|
Have you tried running the queries that spawns the cursors from a query window to compare the results? It could be an issue with the query plan. If the database was upgraded from SQL 2000, be sure that you run sp_updatestats, as statistics are invalidated when you upgrade the database. What style of cursors do you use? Dynamic, keyset, static or forward_only? Updating statistics didn't changed anything. Running the query from |
#4
| |||
| |||
|
|
Updating statistics didn't changed anything. Running the query from the query analyzer takes about 5 seconds for both servers. Cursor from my example is keyset-driven. Database Tuning Advisor for the specified query created few indexes but it also hasn't speed up execution of query. |
#5
| |||
| |||
|
|
(szymon.st... (AT) gmail (DOT) com) writes: Updating statistics didn't changed anything. Running the query from the query analyzer takes about 5 seconds for both servers. Cursor from my example is keyset-driven. Database Tuning Advisor for the specified query created few indexes but it also hasn't speed up execution of query. Next step would be to try DECLARE CUSROR KEYSET from Query Analyzer on both servers. The plan for a keyset or a dynamic cursor can be quite different from the plan for a specific query. Hi |

#6
| |||
| |||
|
|
Below are duration times of execution following commands: declare test_cursor cursor <cursor_type for Select ... open test_cursor fetch next from test_cursor close test_cursor deallocate test_cursor ------------------------------ SQL 2000 Dynamic 332 Static 4997 Keyset 263 Forward_only 359 ------------------------------ SQL2005 Dynamic 297 Static 5286 Keyset 299 Forward_only 343 |
|
So as you can see for keyset driven cursor (which is the same as from my example) the results are quite nice but it didn't solve the problem with ADO :/ I'm afraid that the only solution is to use some other data access technology ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |