Re: Speed problem with mssql 2000 and ado
From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 03/27/04
- Next message: Brian Bushay TeamB: "Re: checking for error following an UPDATE"
- Previous message: Brian Bushay TeamB: "Re: Microsoft Jet 4.0 OLD DB Provider"
- In reply to: Sascha Schroeder: "Speed problem with mssql 2000 and ado"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 26 Mar 2004 20:59:37 -0600
>SELECT FIELD1, FIELD2 FROM TABLE1 WHERE ID = :Id)
>
>FIELD1 = nvarchar(255)
>FIELD2 = ntext
>Id = integer
>
>which is executed one thousand times in a loop. The complete loop takes
>about 70 seconds!!!
Looping like that is a poor idea for an SQL server.
What are you doing with the query?
You can use the Execute method of AdoConnection to get a select query directly
to a recordset. That will save some overhead.
-- Brian Bushay (TeamB) Bbushay@NMPLS.com
- Next message: Brian Bushay TeamB: "Re: checking for error following an UPDATE"
- Previous message: Brian Bushay TeamB: "Re: Microsoft Jet 4.0 OLD DB Provider"
- In reply to: Sascha Schroeder: "Speed problem with mssql 2000 and ado"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|