If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Index pages split in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-26-11, 01:55
raghuripples raghuripples is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Index pages split in db2

Hi,
I have a question on index pages split in db2.
For example,lets say a 4k index page has following entries in it,
1
2
3
8
9
10

and then i insert values 4,5,6 into the table for this key.
Would index page splits happen in DB2(LUW), so after insertion physical allocation looks like this:
page1
------
1
2
3

page2
------
4
5
6
8
9
10

or db2 re-adjusts the index free space in the page during insertion and inserts these records in the same page.
Please help me understand this concept.
I am using db2 v9.5, v9.7 LUW.
How does db2 manage this scenario in db2 z/OS.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-26-11, 03:50
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
New index keys are placed on the same page if there is still enough space. Splits only occur if you run out of space. So in your example, no index leaf page split is done because there are just 10 index entries.

Pretty much all database systems handle things that way. The reason is quite simple: adding another page to the index introduces more overhead because additional I/O may be needed. Furthermore, space utilization would degrade. Doing an in-place reorg and shuffling the index entries around is a lot cheaper in the long run.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 04-26-11, 05:49
raghuripples raghuripples is offline
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks Stolze.
Reply With Quote
  #4 (permalink)  
Old 04-26-11, 07:47
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Also, see PAGE SPLIT .... options on the create index statement (LUW)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On