I bought a new server with spec : HP ProLiant ML310e Gen8 v2 8 GB Single Memory, Intel Xeon E3-1220v3 3,1 GHz, 500 GB SATA 7.5K RPM, Windows Server 2012 R2 x64, SQL Server Standard 2014 x64, RAID 0

Compared with my notebook : ASUS X200CA 2 GB Single Memory, Intel Celeron Dual Core 1.5 GHz, 500 GB SATA 7.5K RPM, Windows 7 Ultimate x64, SQL Server Express 2014 x64, AHCI

I just compared this notebook because the different too much compared with my old server (old server faster). I've setting few configuration with my new server and getting a little better from this post SQL Server 2012 slower than 2008

Testing : (5 Tries)

select top 9000 * from faktur_detail

New Server :

CPU time = 20 ms,  elapsed time = 756 ms.
CPU time = 12 ms,  elapsed time = 720 ms.
CPU time = 8 ms,  elapsed time = 840 ms.
CPU time = 14 ms,  elapsed time = 689 ms.
CPU time = 17 ms,  elapsed time = 740 ms.

My Notebook :

CPU time = 250 ms,  elapsed time = 2403 ms.
CPU time = 172 ms,  elapsed time = 2541 ms.
CPU time = 219 ms,  elapsed time = 2848 ms.
CPU time = 140 ms,  elapsed time = 2426 ms.
CPU time = 172 ms,  elapsed time = 2410 ms.

I had try update, insert and other normal commands and showed that new server faster than my notebook. The problem is with Cursor :

Testing : (5 Tries)

declare @ketqty varchar (50),
        @ketqtyjual varchar (50),
        @ketqtybonus varchar (50),
        @kd_barang varchar (10),
        @kd_rec int,
        @qty numeric,
        @qtyjual numeric,
        @qtybonus numeric


  select kd_rec, qtyjual , qtyBonus , Qty, kd_barang  from RPREKAPJUALALL where NamaKomputer  ='serverhp' 

  FETCH NEXT FROM @RPREKAPJUALALL_Cursor INTO @kd_rec, @qtyjual,@qtybonus, @qty, @kd_barang
      EXEC sp_countsatuandetail  @KD_BARANG, @qty , @RESULT = @ketqty   OUTPUT 
      EXEC sp_countsatuandetail  @KD_BARANG, @qtyjual  , @RESULT = @ketqtyjual    OUTPUT 
      EXEC sp_countsatuandetail  @KD_BARANG, @qtybonus , @RESULT = @ketqtybonus   OUTPUT 

      update RPREKAPJUALALL set ketqty =@ketqty , ketqtyjual  =@ketqtyjual ,ketqtybonus =@ketqtybonus where NamaKomputer ='serverhp' and kd_rec =@kd_rec 

     FETCH NEXT FROM @RPREKAPJUALALL_Cursor INTO @kd_rec, @qtyjual,@qtybonus, @qty, @kd_barang


New Server :

86 seconds.
93 seconds.
85 seconds.
83 seconds.
81 seconds.

My Notebook :

16 seconds.
12 seconds.
14 seconds.
18 seconds.
16 seconds.

I know cursors is really bad for SQL Server, but I can't switched all cursors into normal update soon, because previous programmers left so many cursors in stored procedure.

What possible caused this problem? I've struggling with this 2 weeks now. I've been read so many articles. I come into conclusion that this type of server is not fit become Database Server, because compared with old server, this server slower about 2,8 times even with SELECT command.

OLD Server : Intel Core i3, 1TB SATA HDD 7.5K RPM, 16GB Dual Memory, Windows 7 Ultimate x64, SQL Server 2008 Express x86.

For some reason, I must use this new server for now. Please help me with this Cursor problem for a while. This new server so slow for now even showing a week data. I can't imagine how this ended after 1 month, years.

Any Help will be appreciated. Thank you very much.

  • Does the new instance have the same indexes as the old? Apr 11 '15 at 19:51
  • Yes it is. The database just restored and have same data both.
    – Jun Rikson
    Apr 11 '15 at 20:51
  • 1
    Have you updated the database compatibility to match the new SQL server version or is it still set for 2008? Apr 11 '15 at 23:47
  • 1
    Have you rebuilt your indexes since the move? Apr 11 '15 at 23:49
  • 1
    And updated statistics? And tried both the new and old cardinality estimators? Please search as there are dozens of articles about the things you need to do after upgrading a database to ensure the same or better performance. Apr 12 '15 at 0:25

Im sorry so long not update this question. I solved this case 2 months after this question.

After few times trial and errors, my biggest impact in performance is using separated harddisk between Operation System and Data.

I try to bought new harddisk and look like changing storage system from RAID to AHCI give quite difference in performance for data processing. Well, we do 1 hour backup in Maintenance Job for safety to online cloud service.

I do some changes in BIOS settings which also gives many impacts to performance descried in this pdf http://h20195.www2.hp.com/v2/GetPDF.aspx%2F4AA3-6555ENW.pdf

Im also upgrading memory to 4x8GB

Comparing to my old server its 8 times faster now.

Thank you for helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.