Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Performance Tuning
»
Indexes for Booking Search
15 posts, Page 2 of 2
««
1
2
Indexes for Booking Search
Rate Topic
Display Mode
Topic Options
Author
Message
GilaMonster
GilaMonster
Posted Tuesday, January 04, 2011 4:15 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:19 PM
Points: 38,095,
Visits: 30,388
Grant Fritchey (1/4/2011)
the PK is not being used to determine access to the table. That at least suggests you should be looking elsewhere for the PK.
Not the PK, the clustered index. Though, from the example of what's in the Kind column, it's a very, very, very bad choice for a cluster.
Could be that some of the nonclustered indexes could benefit from reordering columns. Very hard to tell without doing a complete index analysis (which easily takes a month on a large DB)
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1042284
Grant Fritchey
Grant Fritchey
Posted Tuesday, January 04, 2011 4:19 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 9:49 AM
Points: 13,436,
Visits: 25,281
GilaMonster (1/4/2011)
Grant Fritchey (1/4/2011)
the PK is not being used to determine access to the table. That at least suggests you should be looking elsewhere for the PK.
Not the PK, the clustered index. Though, from the example of what's in the Kind column, it's a very, very, very bad choice for a cluster.
Could be that some of the nonclustered indexes could benefit from reordering columns. Very hard to tell without doing a complete index analysis (which easily takes a month on a large DB)
Oh crud, did I type 'PK'. Yes, of course I meant cluster. Thanks for correcting me on that. Yes, you're right [Kind] is a terrible choice, but based on all the info we have currently, it's possibly a better choice than the PK. Not saying it's at all a good choice, just a less bad choice.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1042287
GilaMonster
GilaMonster
Posted Tuesday, January 04, 2011 4:32 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:19 PM
Points: 38,095,
Visits: 30,388
My concern is the comment that was next to the definition of kind:
/* Kinds: Sale / Purchase */
If it's 2 values (and nvarchar255 to boot), it's going to be near-useless as a clustered index. I agree the cluster may well need to move, just don't know to where...
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1042293
Grant Fritchey
Grant Fritchey
Posted Tuesday, January 04, 2011 4:53 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 9:49 AM
Points: 13,436,
Visits: 25,281
GilaMonster (1/4/2011)
My concern is the comment that was next to the definition of kind:
/* Kinds: Sale / Purchase */
If it's 2 values (and nvarchar255 to boot), it's going to be near-useless as a clustered index. I agree the cluster may well need to move, just don't know to where...
Oh wow! I hadn't noticed that. Again, you're right. This is a poor choice for the cluster... and a poor choice for the leading edge of any of the indexes if that's really the data contained in it.
I'd suggest it also begs the question of where the data type came from, but I already know. That's an artifact of nHibernate. Wonderful piece of software.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1042299
TheSQLGuru
TheSQLGuru
Posted Tuesday, January 04, 2011 8:33 AM
Hall of Fame
Group: General Forum Members
Last Login: Today @ 10:32 AM
Points: 3,678,
Visits: 5,176
1) GUIDs are a terrible design choice - fat and fragmenty (coined a new term there)!
2) no wonder your updates are getting slow - look at how many include columns you have in those indexes! You cannot have you cake and eat it too - either you accept lookups and stop including so many columns just to get a covered index or you suck up the blocking/locking/performance hit of maintaining so many fat indexes.
3) BTW, did you perchance use Database Tuning Advisor to derive those indexes??
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1042468
« Prev Topic
|
Next Topic »
15 posts, Page 2 of 2
««
1
2
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.