How to calc storage prarams on INDEXES?

Can anyone recommend any good rules of thumb (or associated reading) on how to calculate
"good" values for index tablespace
allocations? Fox example, if I know the number and datatypes of my keys and the anticipated number of rows, can I workout
a viable INITIAL EXTENT value?

Hi,
Sizing of Indexes
First we will have to find out how much data fits in to one block.
The size of the block header is approximately 161 bytes.
If your block size is 2k then this leaves
2048-161 = 1887 bytes available
Next factor is the pctfree setting.
While calculating an Indexs size we will have to keep pctfree in mind and
deduct that from the total size to find out the actual available size.
If you use a pctfree of 10, then
1887*(pctfree/100) = 1887*0.1=189 (rounded up)
Of the available free space, 189 bytes will be deducted.
1887-189=1698 (bytes available)
Of the 2048 bytes in the block, 1698 bytes are available for storing index
entries.
The next step is to calculate the space used per index entry.
To estimate the space used per index entry, you need to estimate the average
row length.
The average row length is the total of the average length of each value in a
row; for indexes you only need to be concerned about the indexed columns.
For example consider an index containing two columns, all of which are
varchar2 (10). The average row length cannot exceed 20.
Its actual length depends on the data that will be stored there.
If the sample data is available, then the VSIZE function can be used to
determine the average row length.
SELECT AVG (NVL (VSIZE (COLUMN1), 0))+
AVG (NVL (VSIZE (COLUMN2), 0)) AVG_ROW_LENGTH
FROM TABLENAME;
For example, in the sample two-columned index, assume that the average row
length for the indexed columns is 16 bytes. To that total add 1 byte for
each column in the index, for a total of 18 bytes per row. If the index has
columns that contain data that is more than 127 characters long, add an
extra byte for each such column.
Finally, add 8 bytes for the index entry header.
Space used per row = avg_row_length
+8 (for the header)
+ Number of columns
+ Number of long columns (250+)
Space used per row = 16
+8
+ 2
+ 0
=26 bytes per index entry
If the index is a unique index, add I to this total.
26 + 1 = 27 bytes per row
Given 1698 bytes available and 27 bytes per row, you can fit 62 index
entries in a block:
Entries per block = TRUNC (1698 free bytes/27 bytes per entry)
= 62 entries per block.
Since you can fit 62 entries in one block of 2k size you can estimate the
size of the index accordingly.
Creation of a different tablespace for Indexes
(check if you already have a tablespace for this purpose by querying the
data dictionary table dba_tablespaces )
create tablespace indexes
datafile 'd:\oracle\oradata\ocp1\index01.dbf' size 25M
default storage(
initial 250k
next 250k
maxextents unlimited
pctincrease 0
If you are creating a new index then use the following command
Alter table <table_name>
Add constraint <constraint_name> unique (column_name)
Using index tablespace indexes;
If you already have an index and you want to transfer it to the tablespace
created for this purpose then use the following command
Alter index <index_name> rebuild
Tablespace indexes
Storage (initial 2M next 2M pctincrease 0);
Rollback Segment Information:
The following data dictionary views give information about the rollback
segments.
DBA_ROLLBACK_SEGS
GV$ROLLSTAT
V$ROLLNAME
V$ROLLSTAT
with regards,
Boby Jose Thekkanath,
Dharma Computers(P) Ltd.
Bangalore-India.
www.dharma.com

Similar Messages

  • How to user storage templates for DB2 Physical Database.

    Hello
    I cannot find any documentation about the feature "Using storage template for tablespaces and indexes" for DB2 physical database.
    I dont know how to use that features, and it problably wil be very useful for us.
    Regards
    Nelson Rosa

    Hi Phillip,
    I created two storage templates DataStorageTemplate e IndexStorageTemplate.
    Then I associated them in Storage Template Names property.
    Then I set Create Tablespace for each Tablespace, Use One Storage Template For Tablespaces and Use One Storage Template For Indexes.
    Then I Engineer Logical to DB2 Relational.
    After that I notice that tablespaces were created for each table but without storage template associated and more, consulting preferences window the Storage Template Names were vanished.
    It seems that are something going bad despite DB2 databases features.
    Regards
    Nelson Rosa

  • Script to find duplicate index and how can we tell if an index is REALLY a duplicate?

    Does any one have script to find duplicate index? and how can we tell if an index is REALLY a duplicate?
    Rahul

    One more written by Itzik Ben-Gan
    The first query finds exact matches. The indexes must have 
    the same key columns in the same order, and the same included columns but in any order. 
    These indexes are sure targets for elimination. The only caution would be to check for index hints. 
    -- exact duplicates
    with indexcols as
    select object_id as id, index_id as indid, name,
    (select case keyno when 0 then NULL else colid end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by keyno, colid
    for xml path('')) as cols,
    (select case keyno when 0 then colid else NULL end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by colid
    for xml path('')) as inc
    from sys.indexes as i
    select
    object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
    c1.name as 'index',
    c2.name as 'exactduplicate'
    from indexcols as c1
    join indexcols as c2
    on c1.id = c2.id
    and c1.indid < c2.indid
    and c1.cols = c2.cols
    and c1.inc = c2.inc;
    The second variation of this query finds partial, or duplicate, indexes 
    that share leading key columns, e.g. Ix1(col1, col2, col3) and Ix2(col1, col2) 
    would be considered duplicate indexes. This query only examines key columns and does not consider included columns. 
    These types of indexes are probable dead indexes walking. 
    -- Overlapping indxes
    with indexcols as
    select object_id as id, index_id as indid, name,
    (select case keyno when 0 then NULL else colid end as [data()]
    from sys.sysindexkeys as k
    where k.id = i.object_id
    and k.indid = i.index_id
    order by keyno, colid
    for xml path('')) as cols
    from sys.indexes as i
    select
    object_schema_name(c1.id) + '.' + object_name(c1.id) as 'table',
    c1.name as 'index',
    c2.name as 'partialduplicate'
    from indexcols as c1
    join indexcols as c2
    on c1.id = c2.id
    and c1.indid < c2.indid
    and (c1.cols like c2.cols + '%' 
    or c2.cols like c1.cols + '%') ;
    Be careful when dropping a partial duplicate index if the two indexes differ greatly in width. 
    For example, if Ix1 is a very wide index with 12 columns, and Ix2 is a narrow two-column index 
    that shares the first two columns, you may want to leave Ix2 as a faster, tighter, narrower index.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to get the current slide Index or Id?

    I can get the selected slide of presentation use blow method.
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
    if (asyncResult.status == Office.AsyncResultStatus.Failed) {
    write('Action failed. Error: ' + asyncResult.error.message);
    else {
    write('Selected slides: ' + JSON.stringify(asyncResult.value.slides));
    But, How can I get the executor slide?

    ​Hi,
    >> How to get the current slide Index or Id?
    In my option, when you select a slide, it change to current slide. So, you could use the getSelectedDataAsync method to get the current slide, and then get the index or id by using the Slice object. You could refer the link below for Slice Object.
    # Slice.index property (JavaScript API for Office)https://msdn.microsoft.com/EN-US/library/office/jj715285.aspx?f=255&MSPPError=-2147217396
    Some key code as below:
    <script>
    function getText() {
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange,
    { valueFormat: "unformatted", filterType: "all" },
    function (asyncResult) {
    var error = asyncResult.error;
    if (asyncResult.status === Office.AsyncResultStatus.Failed) {
    write(error.name + ": " + error.message);
    else {
    // Get selected data.
    var dataValue = asyncResult.value;
    write('Selected data is ' + dataValue.slides[0].index);
    // Function that writes to a div with id='message' on the page.
    function write(message) {
    document.getElementById('message').innerText += message;
    </script>
    >> How can I get the executor slide?
    What do you mean by this? Is this a new issue which is different from the above issue? If so, I will recommend you post a new thread for this issue and share us more information about this.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I'm a MB Pro beginner (after 25 years with PC). I have an Iomega ext HD, but how do get it indexed. I'm trying searches in Finder, and it says "searching Iomega drive" - but I don't think it's indexing. How do I force it to index?

    I'm a MB Pro beginner (after 25 years with PC). I have an Iomega ext HD, but how do get it indexed?, and it doesn't come up with any results I'm trying searches in Finder, and it says "searching Iomega drive" - but I don't think it's indexing. How do I force it to index?

    Well I'm leaning the other way. I think my present MBP will be the last Apple product I buy.
    With the way Apple is going, all New Mac computers are sealed unit that don't allow the user to upgrade them in any way. They are getting more expensive initially. They are impossible to fix, even by Apple. All the parts are either soldered to the Logic Board or glued inside the case parts. The add on warranty only covers manufacturing defects and is expensive. And to fix one out of waranty is close to if not more then a new system.
    The only thing different in a Mac, and most other products Apple sells, is the operating system and the cases they come in. As for the OS both have their glitches and at this time there are no viruses that infect OS X. There is more software available for Windows. More choices as to what hardware you can use or upgrade to at a later date.
    Mac computers are becoming large iPads or iPhones with built in keyboards.
    jeremy_from_rome wrote:
    And as for the question: PC or Mac, the consensus that I hear from colleagues and friends is just as you state it: stay with Mac, be patient, work at it, and you’ll never look back! Thanks again

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to create storage locations in a standalone scenario??

    Hello everybody,
       I need some help. I'm working with SRM 5.0. I'm making a standalone scenario. When I created the organizational plan, in the check tab, a error appears. The message is: "Define the attribute LAG". The attribute LAG is the storage location, in the extended attributes tab. I've tried defining this attribute but I couldn't.
    Does anybody know how to create storage locations in a standalone scenario??
    Thanks
    Iván Moreno

    Hi Ivan,
    Look at this thread:
    Creating Plants & Locations - Standalone Scenario
    Storage loc is useless in a standalone scenario.
    The "Check" tab makes a generic check on attributes needed for each business scenario, but does not check the integration scenario.
    So you can get rid of this error message.
    You can even deactivate this check on this particular attribute in table BBPV_APPL (SM30), for Confirmation & SC applications.
    Rgds
    Christophe

  • How is the storage type for a component picked automatically in PO staging

    Hi
    The Process cycle is :
    Sales Order created MRP-Planned Order ---Production Order
    Problem : Transfer Requirement not created for Picking
    Now if I go to Co03--GOTOWM Pick list , For the component the storage type is notr updated automatically
    I compared with Materials for a TR was created & found that Storage type 100 was updated automatically
    Q:How is the storage type for a component picked automatically in PO staging (WM activated )

    Hi Rajesh
    Thanks for your inputs . Actually I forgot to mention that the client is not using Storage type in any of the material master data
    The problem was because the control cycle was not maintained for the combination of material /Plant & Supply Area
    Anyway thanks for your info .Appreciate your cooperation
    Arindam

  • How to change Storage Repository on Oracle VM 2.2.2

    Dear All,
    Please help to provide me the procedure how to change storage repository from old one to new one.
    I have 2 VM Servers connected to Sun Storage 6140 (SAN) on the same Server Pool and enabled HA both VM Servers and Virtual Machines.
    [root@vmserver1 ~]# sfdisk -s
    /dev/sda: 143235540
    /dev/sdb: 71162880
    /dev/sdc: 71162880
    /dev/sdd: 292444160
    total: 578005460 blocks
    [root@vmserver1 ~]#
    New Storage Repository
    [root@vmserver2 ~]# fdisk -l /dev/sdd
    Disk /dev/sdd: 299.4 GB, 299462819840 bytes
    255 heads, 63 sectors/track, 36407 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
    /dev/sdd1 1 36407 292439196 83 Linux
    [root@vmserver2 ~]#
    Old Storage Repository
    [root@vmserver2 ~]# fdisk -l /dev/sdb
    Disk /dev/sdb: 72.8 GB, 72870789120 bytes
    255 heads, 63 sectors/track, 8859 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Device Boot Start End Blocks Id System
    /dev/sdb1 1 8755 70324506 83 Linux
    [root@vmserver2 ~]#
    Storage Repository mount point
    [root@vmserver2 ~]# /opt/ovs-agent-2.3/utils/repos.py -l
    [ * ] 4f681824-20d3-4acd-9e53-5dff6bb923ab => /dev/sdb1
    [root@vmserver1 ~]# /opt/ovs-agent-2.3/utils/repos.py -l
    [ * ] 4f681824-20d3-4acd-9e53-5dff6bb923ab => /dev/sdb1
    [root@vmserver1 ~]#
    I wan to move storage repository from sdb1 to sdd1
    Now my Server Pool Master is on VM Server 2
    Thanks,
    Best regards,
    Heng

    Dear Alll,
    I just have new shared disk from Storage on my VM Servers. I have formatted it and now I try to configure it with repos.py script.
    [root@vmserver1 ~]# /opt/ovs-agent-2.3/utils/repos.py -l
    [ * ] 4f681824-20d3-4acd-9e53-5dff6bb923ab => /dev/sdb1
    [   ] c0c26a2a-eb86-44e7-8593-9d142ce33bbc => /dev/sdd1
    How to move all resources from /dev/sdb1 to /dev/sdd1 ?
    Any affected to Virtual Machines?
    Please give advice,
    Thanks and regards,
    Heng

  • How to revert back of secondary indexes created?

    Hi all,
                     I have craeted secondary indexes in development and they have been transported into quality and production. Some dumps are coming in the production because of these secondary indexes.
    Please guide me how to revert back those secondary indexes from production(means to keep original with out that secondary indexes?)
    Please give me solution.
    Regards,
    Lokesh

    Hello,
    The best way to do this is delete the indexes again in DEV and create a transport request.
    Transport this request to QA and PRD and the index will be deleted.
    Via SE14 you can also delete the index immed in PRD.
    SE14 will only delete the index from the database (shortdumps will disappear then).
    Afterwards you can still use SE11 to delete the index from the SAP repository as well.
    Success.
    Wim
    Edited by: Wim Van den Wyngaert on Nov 20, 2009 1:08 PM

  • E-rec   How to create or generate the index category????? SOS!!!!!

    Hi guys,
    How to create or generate the index category?.
    From the posts of this forum I have read more things but anything works:
    reports:
    -RSRETT02
    -RCF_INITIALIZE_KPRO
    -RSTIRIDX_INDXCAT_RETRIEVE
    Can anyone show me the way?
    Thanks in advance.

    Hello,
    If you haveat least Version 7.10.18 then KPro configurations are no longer required. Did you activate Business Function HCM_ERC_SES_1 as this is required for SES? The scenario to choose will depened on whether you are making a new implementation, upgrading without use of SES before or upgrading after using SES with earlier versions. Scenario 1 is for when you have activated HCM_ERC_CI_3 after using earlier versions with HCM_ERC_SES_1 already activated. Scenario 2 is for those who have upgrade and activated HCM_ERC_CI_3 but where using search without SES in their earlier version. Last scenario is when you are making a new e-Recruiting implementation (not upgrading). Also check notes 1426757 and 817145.
    When you try to search are you getting an error? Can you check in SLG1 transaction after trying to search and post the error messages. Also can you execute report RCF_CHECK_SEARCH_SETTINGS as it will point you to the missing configurations points if any based on your version.
    Regards,

  • How Database chooses the proper Secondary index

    Hello All,
              Can any one tell me how database find the proper secondary index, in my case database is taking the wrong index leading to performance problem..
    Please help
    Regards.
    Anmol

    Hi Rob, Hi Herrman,
    The Statistics are.
    Last statistics date                  05/26/2008
    Analyze Method              mple 16,671,728 Rows
    Number of rows                        16,671,728
    Number of blocks allocated             1,346,764
    Number of empty blocks                     1,880
    Average space                                983
    Chain count                                    0
    Average row length                           573
    Partitioned                                   NO
    NONUNIQUE  Index   LTAP~Z01                                                                  
    Column Name                     #Distinct                                                      
    MANDT                                          1 
    NLENR                                  5,361,981 
    VLENR                                  5,293,012 
    Last statistics date                    /  /     
    Analyze Method                      Not analyzed 
    Levels of B-Tree                               0 
    Number of leaf blocks                          0 
    Number of distinct keys                        0 
    Average leaf blocks per key                    0 
    Average data blocks per key                    0 
    Clustering factor                              0                                               
    NONUNIQUE  Index   LTAP~Z02                      
    Column Name                     #Distinct                                             
    MANDT                                          1 
    LGNUM                                          6 
    VLTYP                                         29 
    VLPLA                                    464,011 
    PQUIT                                          2 
    Last statistics date                  05/26/2008 
    Analyze Method              mple 16,671,728 Rows 
    Levels of B-Tree                               3 
    Number of leaf blocks                    119,190 
    Number of distinct keys                  479,275 
    Average leaf blocks per key                    1 
    Average data blocks per key                   19 
    Clustering factor                      9,327,938 
    NONUNIQUE  Index   LTAP~Z03                                                             
    Column Name                     #Distinct                                                         
    MANDT                                          1  
    LGNUM                                          6  
    NLTYP                                         30  
    NLPLA                                    338,815  
    PQUIT                                          2  
    Last statistics date                  05/26/2008  
    Analyze Method              mple 16,671,728 Rows  
    Levels of B-Tree                               3  
    Number of leaf blocks                    115,356  
    Number of distinct keys                  341,753  
    Average leaf blocks per key                    1  
    Average data blocks per key                   23  
    Clustering factor                      8,025,025

  • How to calc array length in Labwindows CVI ?

    How to calc array length in Labwindows CVI ? In labwiew,I can find function to calc array length,but in CVI ,I can not ,...

    Hello 让一切随风 
    char  *name ;                              
    int length = 0;
    int i = 0;
     name = malloc(256) ; 
    strcpy(name   , "National Instruments");
    while( name[i] ! = "\0")
      length ++;
    i++
    free(name);

  • HT4759 how to cancel storage upgrade immediatley

    how to cancel storage upgrade immediatley on iphone?
    Do i have to contact someone or can i just cancel it directly from my phone now

    Why is it so "easy" to cancel a service with APPLE?  I have signed up for a iCloud plan two years ago and now have decided to cancel it simply because I don't want to use it anymore. I went on Apple.com to read the whole support area with so many subjects while none of them would give me a clue on how to cancel the service. Then I tried to find the phone number to call, then the website gave me two options - either leave a phone number so someone can call me back, or call them LATER, WHY? I chose to leave a phone number but the site gave me some time slots that are all super early in the morning like 5 or 6 or 7 in the morning which is totally not convenient for me, as a single mom I am extremely busy in the morning. Then finally I found a general service phone number to call. First, I had been put on hold for 5 minutes until someone answered my phone, then she put me on hold again for another 10 minutes just to connect to another department or so. Then finally I got to talk to the right person, she asked me a bunch of security questions that makes me feel like I might not be able to cancel the service if I ever failed to answer those questions. Thanks god, I passed the test!  Then she put me on hold again for another 5 to 7 minutes, and the other side of the phone started playing very annoying heavy rock and roll music that almost made me hang up!  Normally I don't write reviews or give comments on services but this time APPLE really ****** me off by playing such an old fashioned bad trick to keep a customer which is polar opposite from their products and other services.

  • How delete other storage from ipad air?

    How delete other storage from ipad air?

    The iOS will NOT automatically delete "other" if the device gets full. That is totally incorrect.
    "Other" is basically all of the data and stuff that does not fit into any of the other categories on the device, like apps, photos, music, videos, and so on. It contains Safari Bookmarks and History, Notes, Contacts, Email messages, Text Messages, photos assigned to contacts, cached app data (but not documents themselves) etc. When "other" becomes too large, it can take up a lot of space and cause problems. It should not be more than a few GB at most and for most people it would probably be around 400MB - 2 GB.
    IF something gets corrupted on the iPad and "other" grows out of control, you may have to restore the device in order to clear that data. One starting point troubleshooting step for dealing with the problem is to backup your iPad, restore to factory settings and then restore the backup. There are also other less invasive things that you can try first.
    A Google search will turn up many articles that talk about how to reduce "other" on an iOS device.
    http://osxdaily.com/2013/07/24/remove-other-data-storage-iphone-ipad/
    http://www.maclife.com/article/howtos/how_remove_other_data_your_iphone
    http://www.imore.com/what-other-storage-category-iphone-and-ipad-and-how-fix-it
    http://www.igeeksblog.com/how-to-remove-other-data-from-iphone/

Maybe you are looking for