| Posted by  szymon.strus on 06/21/07 08:59 
On Jun 19, 12:29 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:>  (szymon.st...@gmail.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
 
 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 :(
  Navigation: [Reply to this message] |