December 14, 2013 at 6:46 am
Hi,
I have pk and fk in the database , i want to find out where i can make some good indexes.(sqlserver 2005)
Questions
1) Is there any dmv which can help me in finding out where should i make indexs?
2) What counter i should use in profiler to find the above ?
3) If any other tool is availabe please tel me.
yours sincerely
December 14, 2013 at 7:49 am
Maybe start by reading up on indexes
http://www.sqlservercentral.com/articles/Indexing/68439/
http://www.sqlservercentral.com/articles/Indexing/68563/
http://www.sqlservercentral.com/articles/Indexing/68636/
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
December 16, 2013 at 1:15 am
Thank you for links, i am brushing up .
Database Engine Tuning Advisor uses trace files, trace tables, Transact-SQL scripts, or XML files as workload input when tuning databases.
So please tel me which technique will be more accurate for identification of indexs?
like queries or trace etc. because i think some of them might be based on sampling.
If i can get pros and cons of each type of input to database engine tuning advisor then that would be help full
in deciding?
yours sincerely.
December 16, 2013 at 3:40 am
To be honest, the most accurate is to tune by hand, look at problematic queries, create indexes to support them. DTA's OK if you don't know how enough about indexes to choose good ones yourself, but you do have to test all its recommendations before implementing them.
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
December 17, 2013 at 9:15 am
If i can get pros and cons of each type of input to database engine tuning advisor then that will be help full?
(Any link will be help full)
yours sincerely
December 17, 2013 at 9:50 am
You need a representative workload for DTA to be even remotely accurate, so that's a trace file (or table, makes no difference) that recorded as much of a business cycle as possible and feasible, or a representative sample thereof.
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
December 17, 2013 at 10:00 am
I'd suggest getting a copy of my book. I go through all the information you're asking in great detail. The 2008 version is more applicable for your 2005 instance, but the 2012 version has more accurate information (there were some mistakes in the first version).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 20, 2013 at 12:33 am
Thank u sirs ,
I will read those topics again from the books.
but if possible please write a word for use of (tsql vs trace) in Database Engine Tuning Advisor .
Finally i will check thing like query plan,dmo,dta.
If any thing else exist please tel me.
yours sincerely
December 20, 2013 at 12:36 am
rajemessage 14195 (12/20/2013)
but if possible please write a word for use of (tsql vs trace) in Database Engine Tuning Advisor .
I answered that one
GilaMonster (12/17/2013)
You need a representative workload for DTA to be even remotely accurate, so that's a trace file (or table, makes no difference) that recorded as much of a business cycle as possible and feasible, or a representative sample thereof.
Finally i will check thing like query plan,dmo,dta.
I'm not sure how the Database Management Objects (DMO), which is a programming interface for writing SQL Server management apps is going to help you identify indexes.
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
December 20, 2013 at 4:26 am
rajemessage 14195 (12/20/2013)
Thank u sirs ,I will read those topics again from the books.
but if possible please write a word for use of (tsql vs trace) in Database Engine Tuning Advisor .
Finally i will check thing like query plan,dmo,dta.
If any thing else exist please tel me.
yours sincerely
You can run a single statement through the Database Tuning Advisor. It will attempt to suggest indexes and statistics that my result in improvements in performance. But it's absolutely one at a time. Running the output of trace through the Database Engine Tuning Advisor results in lots of queries being checked. That's the difference.
Do not trust the output of the Database Tuning Advisor. It's wrong a lot of the time. Very wrong.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 23, 2013 at 1:02 am
One more point is remaining.
I wanted to know the index ,statistic , etc recomendations made be tuning adviser is perfect or it is perfect to some percentage, as u said it is not perfect.
Specialy i need to know what objects it check ,should i do some thing to thoes objecs which are used by tuning adviser for recomondation to increase the correctness of recommondation?
yours sincerely
December 23, 2013 at 4:53 am
It's never perfect. We've told you the best way, but you still have to test and check all recommendations.
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
December 23, 2013 at 8:05 am
I would not take a single suggestion from the Database Tuning Advisor as safe. I would assume that each and every suggestion is suspect until I tested it. I do not trust it, at all, to get things right. And I know that sometimes it gets things wrong.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply