Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Strange index behaviour

Author  Topic 

maciego
Starting Member

4 Posts

Posted - 2011-01-07 : 10:03:35
Hi,
I have several stored procedures colled from another one. I added some clustered indexes to them (mostly by finding missing indexes in ssms execution plan functionality).
On my own computer ther are executing 50% faster. But on server adding indexes makes no difference (same database, with or without clearing cache, with or without restarting service - many tests executed).
Is there anyone who faced same problem.

Thanks for any help

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-07 : 11:08:41
Have you checked the execution plans after adding the indexes? How do they differ between the server and the computer?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-07 : 11:24:28
Is the volume of data on your computer and the server exactly the same?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-01-07 : 13:09:02
And, is your laptop equipped with SSD drives and your server has old SCSI-2 drives?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

maciego
Starting Member

4 Posts

Posted - 2011-01-07 : 15:14:44
Thanks for replies...
I didn't checked if execution plans differs on my computer and a server. But I did checked that ssms not shows anymore that an index is missing.
On monday I will compare servers sizes.
I don't work on laptop - just standalone normal computer ;) with 10 000 rotation speed WDD hard drive. But I don't know what hard driver type is in server. I will check.
Regards (and sorry for my english)
Go to Top of Page

maciego
Starting Member

4 Posts

Posted - 2011-01-10 : 05:07:15
I did some researches...
Both databases have same size (with or without indexes).
On server there are 2 hard drives 7200 RPMs SATA in RAID-1. It's much slower then my 10000 RPMs SATA2 hard drive.
Any other thougts what can couse this strange behaviour?
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-10 : 05:15:51
Different data
Different indexes
Different load
Different amounts of memory.
etc

--
Gail Shaw
SQL Server MVP
Go to Top of Page

maciego
Starting Member

4 Posts

Posted - 2011-01-10 : 05:20:28
Databases are exactly the same. Procedures do same operations. Indexes are the same.
Load is different and memory too.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-01-10 : 06:44:43
When load is different, and memory too, SQL Server works differently becuase it need the underlying hardware.
If you have a small amount of memory, everything takes more time.
And since your server has an old SCSI-1 drive and you have a fast SATA2 drive on your local machine, no wonder the procedures run faster on your machine than the server.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-01-13 : 12:25:14
Have you tried enabling "write caching on device" to your hard drive ?

PBUH

Go to Top of Page
   

- Advertisement -