March 13, 2008 at 12:39 am
Hi
How to do performance tuning? and when to do?
Koteswarrao
March 13, 2008 at 12:46 am
This is a more generic question.
You need to make sure every db portion that pushes to production will be performed as intended. This is where the performance tuning comes into play.
Performance tuning is an art that you have to learn through the experience.
Susantha
March 13, 2008 at 2:21 am
March 13, 2008 at 6:54 am
Hi
Thank you for giving reply
koteswarrao
March 13, 2008 at 6:58 am
hi
thank you for giving reply......my query is what shuld considered while doing performance tuning? plz give me reply
reards
koteswarrao
March 13, 2008 at 7:12 am
While it's true that there is some trickery you can perform to "Tune the hardware" and "Tune the database" and you can throw indexes at tables to make some queries run better, 90% of all major performance gains come from writing good code... period!
Does the code have cursors, While loops, triangular joins, multiple correlated sub-queries, aggregated views (not indexed views), views of views, multiple complex triggers, UDF's of UDF's, or calculated join/filter conditions? All of those are either a form of RBAR or just plain bad practices.
Trying to tune a hard disk so it will do a triangular join or a cursor faster might buy you 5% performance improvement.
Fix the code... that's where the real tuning is done.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 8, 2010 at 11:29 pm
Do performance tuning using SSAS....... when u need.:-D
March 9, 2010 at 5:17 am
anishrtuladhar (3/8/2010)
Do performance tuning using SSAS....... when u need.:-D
Not sure what you mean. How do you performance tune a query using SSAS?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 10, 2010 at 6:21 am
There are a kajillion things that can affect performance. Read books, take classes, do the work for several years. If you are smart then by that point you might start to get good at it. If you aren't smart then you will still be struggling. 😀
The BEST way to learn how to tune is to hire a performance tuning mentor and learn from them as they work on your system.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
August 21, 2010 at 5:24 am
Hi,
i will give you the brief introduction about the performance issues.
1. connectivity problems &
2. Database tuning issues
Database tuning issues in
1. identifying the blockings & Deadlocks.
2. identifying missing indexes.
3. identifying top 10 cpu bound queries.
4. identifying top 10 I/O bound queries
Subha
DBA
August 21, 2010 at 10:53 am
subha.msc2007 (8/21/2010)
Hi,i will give you the brief introduction about the performance issues.
1. connectivity problems &
2. Database tuning issues
Database tuning issues in
1. identifying the blockings & Deadlocks.
2. identifying missing indexes.
3. identifying top 10 cpu bound queries.
4. identifying top 10 I/O bound queries
Subha
DBA
You forgot the "crap code" problems. 😛 Ah... maybe not. 3 and 4 cover those, I suppose. :hehe:
--Jeff Moden
Change is inevitable... Change for the better is not.
August 21, 2010 at 2:36 pm
Jeff Moden (8/21/2010)
subha.msc2007 (8/21/2010)
Hi,i will give you the brief introduction about the performance issues.
1. connectivity problems &
2. Database tuning issues
Database tuning issues in
1. identifying the blockings & Deadlocks.
2. identifying missing indexes.
3. identifying top 10 cpu bound queries.
4. identifying top 10 I/O bound queries
Subha
DBA
You forgot the "crap code" problems. 😛 Ah... maybe not. 3 and 4 cover those, I suppose. :hehe:
I'd flip the order around too. Once you've identified the top 10 worst performing queries, you're quite likely to be able to identify missing indexes from those. Will make more impact that just adding indexes without testing if they are useful first.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 22, 2010 at 8:25 am
Yup, the good old addage that you can achieve 80% of the results by doing 20% of the work. That holds extremely true in sql server tuning.
I've even found 95%-5% to be quite possible.
August 23, 2010 at 7:18 am
I would agree that these 4 are a good starting point.
August 24, 2010 at 7:44 am
Turn on SQL Profiler with TextData, HostName, ApplicationName, CPU, Reads, Writes, and Duration (and whatever else you like) for the SQL:BatchCompleted and RPC:Completed events only.
Set it to run for a few hours, and save to a trace file or a database table. I've heard repeatedly that saving to a trace file is lighter weight than to a database table; on one particular oddball system the opposite appears to be the case.
Pull that output into a database table from the trace file http://support.microsoft.com/kb/270599.
Sanitize the TextData so any TextData that has high reads or shows up a lot becomes identical, i.e.
UPDATE Table
SET TextData = 'SELECT * FROM table WHERE EmployeeID = %'
WHERE TextData LIKE 'SELECT * FROM table WHERE EmployeeID = %'
Then start with:
SELECT TOP 500 TextData, SUM(Reads), SUM(Writes), SUM(CPU)
FROM Table
GROUP BY TextData
ORDER BY SUM(Reads) DESC
and
SELECT TOP 500 HostName, SUM(Reads), SUM(Writes), SUM(CPU)
FROM Table
GROUP BY HostName
ORDER BY SUM(Reads) DESC
and so on.
If you can, use a good text editor with RegEx search and replace to build the UPDATE statements in bulk; it can get exquisitely tedious, but I'm not aware of a better way to automatically do it.
If you can, have the developers parameterize their SQL before you start(!)
Viewing 15 posts - 1 through 15 (of 22 total)
You must be logged in to reply to this topic. Login to reply