This is a discussion on Slow Insert in SQL Server within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec on an ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec on an other SQL Server. The slower run on windows 2000 terminal server and the faster on windows 2000. The slower The slower have 2 Go of ram, the faster 512 Mo!!! How to diagnostic what's going wrong on the slower server? I can't change the application who do the insertions. |
| |||
| Volks wrote: > Hi, > > It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec > on an other SQL Server. The slower run on windows 2000 terminal server > and the faster on windows 2000. The slower The slower have 2 Go of > ram, the faster 512 Mo!!! > > How to diagnostic what's going wrong on the slower server? I can't > change the application who do the insertions. That is amazingly slow. Using a different commercial database product, on my slightly anemic IBM ThinkPad (2GB RAM) I just id 40,000 inserts in 0.14sec. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |
| |||
| Compare the hard drive configurations. SQL Server is, after all, a database system, and disk performance is overwhemlingly important. More important than CPU or memory for a single load process. Factors that could slow such a process down include logs not isolated on their own drives and RAID 5, always slow on writes. Of course combining those two could be particularly bad. Next, where is the data coming from? Over the network? From another hard drive on the same server? From the same hard drive as the database files? Is the location of the data the same for both servers? Roy Harvey Beacon Falls, CT On 16 Aug 2006 12:36:04 -0700, "Volks" <patrick.simard@isac-inc.com> wrote: >Hi, > >It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec >on an other SQL Server. The slower run on windows 2000 terminal server >and the faster on windows 2000. The slower The slower have 2 Go of >ram, the faster 512 Mo!!! > >How to diagnostic what's going wrong on the slower server? I can't >change the application who do the insertions. |
| |||
| 1.Run Processor -> % Processor Time SQLServer:SQL Statistics -> Batch Requests/sec over the period of the INSERTS 2.Are these INSERTS coming from an app over a network? ---- Jack Vamvas ___________________________________ Receive free SQL tips - www.ciquery.com/sqlserver.htm ___________________________________ "Volks" <patrick.simard@isac-inc.com> wrote in message news:1155756964.614937.145000@h48g2000cwc.googlegr oups.com... > Hi, > > It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec > on an other SQL Server. The slower run on windows 2000 terminal server > and the faster on windows 2000. The slower The slower have 2 Go of > ram, the faster 512 Mo!!! > > How to diagnostic what's going wrong on the slower server? I can't > change the application who do the insertions. > |
| ||||
| > It takes 4 minutes to insert 40 000 records on a SQL Server This performance is exactly what I would expect when each insert is done in an individual transaction and there is no write caching. A physical transaction log write is required during COMMIT to guarantee that data are permanently persisted and a disk can typically sustain only 150-200 I/Os per second. Server grade hardware usually has write-caching that greatly improves write performance while ensuring persistence (e.g. controller cache battery backup). However, you can probably improve performance greatly with your current configuration by performing the inserts in a single transaction. This ought allow you to achieve the kind of performance Daniel alluded do. -- Hope this helps. Dan Guzman SQL Server MVP "Volks" <patrick.simard@isac-inc.com> wrote in message news:1155756964.614937.145000@h48g2000cwc.googlegr oups.com... > Hi, > > It takes 4 minutes to insert 40 000 records on a SQL Server and 40 sec > on an other SQL Server. The slower run on windows 2000 terminal server > and the faster on windows 2000. The slower The slower have 2 Go of > ram, the faster 512 Mo!!! > > How to diagnostic what's going wrong on the slower server? I can't > change the application who do the insertions. > |