September 4, 2007 at 2:39 pm
Running SQL 2005 SP2 on windows server 2003 sp2.
Performing a simple one record insert through a stored procedure called from an app server, the CPU is 0 to 16, the Reads are below 50 (usually 2).
What are some things that would cause a Duration of ~500 (half a second)? Actually duration fluctuates drastically. It's either really low (under 5) or around 500. This really affects performance as this is how we do data imports... RBAR. We can't fix the app at the moment, but are there some things we can do to keep it at 5 instead of 500?
Regards,
Rubes
September 4, 2007 at 3:54 pm
you are likely experiencing "blocking". Run a trace ( or sp_blocker script) to detect those and figure out what is the root cause
* Noel
September 5, 2007 at 7:01 am
1) Are there indexes on the table being inserted into? Index maintenance can cause more page splits and thus delays. Speaking of page splits, are your fill factors set appropriately for high-volume inserts?
2) Are any Foreign Keys involved? Another point of effort and also possible contention.
3) Does your database have much free space? If you 'forgot' to size the database correctly and set the growth increment of the data file you are really screwing yourself because a) 1MB is default growth --> very frequent growths which is a minor delay each time and b) your data file is fragmented to hell and back causing overall suboptimal performance.
4) Checking for blocking is key too, as noeld mentioned.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
September 5, 2007 at 2:39 pm
Thanks for the advice.
I did find that it is a larger issue. Several jobs are showing longer run times. One piece to the puzzle is higher than usual waittimes (500 ms) on WriteLog. This points to disk IO issues but these databases reside on a SAN. Plus, there are other (almost identical in configuration and hardware) database servers that reside on the same SAN that are *not* having issues.
Regards,
Rubes
September 5, 2007 at 4:10 pm
Since you now bring up SAN, what is the layout of the LUNs and also the file placements for both the db that is having perf issues as well as the ones that are not? There are some really sub-optimal things you can do with file placements, SAN or direct-attached. If the slow db's log file(s) are on a lun that is raid5 and which is also getting hit with lots of other I/Os (especially non-sequential), performance could really suck.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
September 5, 2007 at 9:52 pm
MDFs and LDFs are on separate RAID5 SAN drives. There are no other files on these drives. All servers have the same configuration and reside on the same SAN. Backups are on a 3rd SAN drive and we use Tivoli to backup the backup files to tape.
Regards,
Rubes
September 5, 2007 at 10:03 pm
Have you fired up perfmon and or any SAN client tools yet and taken a look at the various disk counters, etc.? Even the magic SAN has limitations/gets busy and you could very well be waiting on I/O.
Joe
September 5, 2007 at 10:13 pm
Passing any parameters to the sproc? If you are, post the code so we can take a peek for ya...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 6, 2007 at 2:48 pm
are you experiencing autogrows ?
* Noel
September 6, 2007 at 6:41 pm
Check execution plans of your query; if you find the estimated number of records way lower than the actual returned records, then that's sign of stats. Also, check the stats date on the index/table. Most likely, your statistics are dated. if so, run update stats with full scan and that should do the trick.
Thanks,
Ayman
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply