Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Create Clustered Index on a Very Large Table (500 GB) Expand / Collapse
Author
Message
Posted Friday, August 8, 2014 1:49 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:51 AM
Points: 5,446, Visits: 7,616
TheSQLGuru (8/7/2014)
I think this is slightly mis-stated Jeff. While you may not get fragmentation from end-of-index inserts, you certainly can get page LATCH contention, which can be a significant bottleneck to good insert performance in such a scenario.


Kevin, won't you get LATCH contention at the Extent tail either way?



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1601325
Posted Friday, August 8, 2014 1:56 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 7:09 AM
Points: 4,439, Visits: 6,346
Evil Kraig F (8/8/2014)
TheSQLGuru (8/7/2014)
I think this is slightly mis-stated Jeff. While you may not get fragmentation from end-of-index inserts, you certainly can get page LATCH contention, which can be a significant bottleneck to good insert performance in such a scenario.


Kevin, won't you get LATCH contention at the Extent tail either way?


Not if you use a non-"tail-end" type key. This is often done in high-volume insert scenarios to spread the latching around the range of values, at least a bit. Hashes or mods or even GUIDs (yes, it hurt just a little bit to say that ) can be a win in scenarios like that.


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1601326
Posted Friday, August 8, 2014 2:35 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 9:51 AM
Points: 5,446, Visits: 7,616
TheSQLGuru (8/8/2014)
Evil Kraig F (8/8/2014)
TheSQLGuru (8/7/2014)
I think this is slightly mis-stated Jeff. While you may not get fragmentation from end-of-index inserts, you certainly can get page LATCH contention, which can be a significant bottleneck to good insert performance in such a scenario.


Kevin, won't you get LATCH contention at the Extent tail either way?


Not if you use a non-"tail-end" type key. This is often done in high-volume insert scenarios to spread the latching around the range of values, at least a bit. Hashes or mods or even GUIDs (yes, it hurt just a little bit to say that ) can be a win in scenarios like that.


Sorry, I wasn't clear. I meant HEAP or tail-end CI would react nearly similarly to my knowledge for hot spot contention.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1601332
Posted Friday, August 8, 2014 5:30 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 5:34 PM
Points: 35,609, Visits: 32,200
TheSQLGuru (8/7/2014)
I think this is slightly mis-stated Jeff. While you may not get fragmentation from end-of-index inserts, you certainly can get page LATCH contention, which can be a significant bottleneck to good insert performance in such a scenario.


Thanks for the feedback, Kevin. It is certainly possible that I've not worked on a system that has had a high enough level of tail-end inserts to matter. Expedia.com (we took care of the "yellow box" adds at the top and the bottom) was the biggest I've worked on and the number of inserts weren't what I'd call huge (just a couple of hundred every couple of seconds). That's also where the incident with the application timeouts due to page splits on an NCI with low selectivity occurred and that's what I was basing my comment on. It was amazing just how quickly it happend. As soon as the index committed, WHAM! As soon as we dropped the index, the problem went away just as quickly. The table did have a CI on an IDENTITY column.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1601359
Posted Friday, August 8, 2014 6:23 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 10:40 PM
Points: 23, Visits: 66
Hey guys, sorry I'm a bit late on this but I had a question in regards the Online re-indexing in Enterprise. Does the ONLINE=ON completely eliminate the possibility of Table Locks when the process is running or does it just lower the % of that?

Thanks
Post #1601362
Posted Friday, August 8, 2014 7:44 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 7:58 AM
Points: 416, Visits: 1,336
SQLnbe (8/8/2014)
Hey guys, sorry I'm a bit late on this but I had a question in regards the Online re-indexing in Enterprise. Does the ONLINE=ON completely eliminate the possibility of Table Locks when the process is running or does it just lower the % of that?

Thanks


Maybe you should open a new thread for that? But the answer is no. Still some locks are needed but the operation is less intrusive.

Grab a cup of coffee and read this: How Online Index Operations Work
Post #1601364
Posted Friday, August 8, 2014 8:43 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 10:40 PM
Points: 23, Visits: 66
sql-lover (8/8/2014)
SQLnbe (8/8/2014)
Hey guys, sorry I'm a bit late on this but I had a question in regards the Online re-indexing in Enterprise. Does the ONLINE=ON completely eliminate the possibility of Table Locks when the process is running or does it just lower the % of that?

Thanks


Maybe you should open a new thread for that? But the answer is no. Still some locks are needed but the operation is less intrusive.



Ok thanks
Post #1601365
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse