SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Page split with Clustered index


Page split with Clustered index

Author
Message
RakeshRSingh
RakeshRSingh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2895 Visits: 208
I am testing Page Split with Clustered Index and Non-clustered Index.

I have created Single Clustered Index on a table and Inserted incremental values in the table. I do have others columns also but only one clustered index.

My question is still I am getting page splits. What is the reason for the page split if I am inserting always incremental values.

Another test I did with single non-clustered index on the same key and inserted incremental values. But I found less page split here.

Please clear this doubt as why there is page split if I have inserted data in incremental order.
Jim McLeod
Jim McLeod
SSC Eights!
SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)

Group: General Forum Members
Points: 933 Visits: 1121
How are you measuring whether or not you're getting page splits?
RakeshRSingh
RakeshRSingh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2895 Visits: 208
I am using perfmon to track Page Split/Sec event
changbluesky
changbluesky
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 150
page split will happen when the page is full and also you want to insert data continually.

can set the index fill factor less than 100 to keep some space for inserted data.:-P
Jim McLeod
Jim McLeod
SSC Eights!
SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)SSC Eights! (933 reputation)

Group: General Forum Members
Points: 933 Visits: 1121
RakeshRSingh (7/13/2010)
I am using perfmon to track Page Split/Sec event


The problem with page split counters is that they will fire whenever a new page is allocated, and not just when a page splits and data is moved. This is likely to be what you are seeing.
RakeshRSingh
RakeshRSingh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2895 Visits: 208
So How can I get a perfect picture as when the page Split is occuring.
RakeshRSingh
RakeshRSingh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2895 Visits: 208
Thanks Jim for the Reply.

Does the Page Split counter misguiding.. How can I get the page split then for a clustered index entry.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)

Group: General Forum Members
Points: 147720 Visits: 41713
RakeshRSingh (7/13/2010)
I am testing Page Split with Clustered Index and Non-clustered Index.

I have created Single Clustered Index on a table and Inserted incremental values in the table. I do have others columns also but only one clustered index.

My question is still I am getting page splits. What is the reason for the page split if I am inserting always incremental values.

Another test I did with single non-clustered index on the same key and inserted incremental values. But I found less page split here.

Please clear this doubt as why there is page split if I have inserted data in incremental order.


Any chance of you posting the table creation code, the index code, and your inserts? It's the only way someone is going to be able to help you on this one.

--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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)

Group: General Forum Members
Points: 147720 Visits: 41713
changbluesky (7/14/2010)
page split will happen when the page is full and also you want to insert data continually.


Not if the data is inserted in the same order as the clustered index.

--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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
RakeshRSingh
RakeshRSingh
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2895 Visits: 208
Thanks Jeff, Here is the script I am running and using perfmon I am measuring page splits/sec.

CREATE TABLE [dbo].[Tab1](
[ORG_KEY] [bigint],
[PROD_KEY] [bigint],
[TIME_KEY] [bigint],
[CST_NON] [float],
[CST_RPL] [float],
[RTL_NON] [float],
[RTL_RPL] [float],
[UNT_NON] [float],
[UNT_RPL] [float],
[UPDATE_DATE] [datetime]
)
with all the columns allows null

CREATE UNIQUE CLUSTERED INDEX [IX_ORGKEY] ON [dbo].[Tab1]
(
[ORG_KEY] ASC
) with all the default value and fill factor of 100.


DECLARE @cnt INT
SET @cnt = 1
WHILE @cnt <= 100000
BEGIN
INSERT INTO Tab1 VALUES(@cnt,19280,10255,250,500,350,450,375,275,GETDATE())
SET @cnt = @cnt + 1
END
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search