Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle Index partitioning

Posted on 2003-03-13
9
Medium Priority
?
33,904 Views
Last Modified: 2011-08-18


Hi,

I have very huge table ( 150 fields and 35 Million records), every month that table will grow up to 20 Gig.

Users will be running reports against this table with date range. I understand that I can partition this table according to the insert date, so that when a user runs a reports for period, we can get better performance. Also it will be easy for archiving.

What I don't know is, How I can better use of Index Partitioning?. Also I will be loading data once a week (8 million records / week). Currently we are dropping the index and loading the data and recreating the index.
Is there any other way to speedup the loading time?.
How can the Index Portioning will help in this manner?

Let me know

Thanks in advance
 
0
Comment
Question by:ssv1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Author Comment

by:ssv1
ID: 8134420
I don't have much points.. Thats why I am giving 30...But  issue is important..
0
 
LVL 3

Expert Comment

by:rramineni
ID: 8137233
You did not mention how the data is loaded (tools used). I am assuming that you re using sqlldr to load the data. Try to use bulk load procedures to improve the loading performance. The current method of droping the indexes and recreating is definitely giving you good performance. This combined with bulk load procedures definitely should impove. What kind of indexes are they anyway?. If the indexes are global, reindexing might quite some time depending on the volume of the data. If they are local, you could make them unusable by issuing the command

alter index <inx name> partition <partition> unusable;

Once the data is loaded, rebuild the index partition separtely. you could also apply parallelism during the data load and index rebuild.

HTH
0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 8137767
The simplest index partition scheme is to partition it the same way the table is partioned.  If you just add the word "local" to your "create index..." command Oracle will automatically partition the index to match the table's partitions (if the index includes the partition key column).  Then when you load the new records (assuming they go into a new, empty partition each time) Oracle will automatically populate the new index partition and you will not have to drop or rebuild the index.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:ssv1
ID: 8139333
Thanks for your comments,

I need to index many different combination of columns for reporting. In this case Do i need to crate all the indexes as a local or only the partition key index need to be local.

What will be performance incase if the reports are going to run against multiple partition.

0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 8139572
No, you don't "need" to create all the indexes as local.  But there are performance advantages if you do.  Also, any global indexes that exist when you load data will slow the data load considerably.  The other option is to drop the global indexes before the load, then rebuild them after.

Even a local index based on the partition key may not help much if the reports are going to run against multiple partitions.  (This varies of course based on how many partitions there are, and on how many are needed for the query.)  Partitioned indexes that include the partition key column will be most effective for queries that only need to read one (or very few) partitions.
0
 

Author Comment

by:ssv1
ID: 8139577
In addition to that..

Assume that I have 8 index (normal) combinations, If I choose to go with Index partitioning (assume that I have already partitioned the table into 5 partition - for 5 month), is that means if I insert 6th month data into new partition, the corresponding 8 index will be stored in the same 6th partition.

What will be the performance if the query retrieves from both partition.

Since I am not going to drop the index before loading (assume I have partition the table along with 8 index) is there any performance degrade?.

Thanks


0
 

Author Comment

by:ssv1
ID: 8139598
In addition to that..

Assume that I have 8 index (normal) combinations, If I choose to go with Index partitioning (assume that I have already partitioned the table into 5 partition - for 5 month), is that means if I insert 6th month data into new partition, the corresponding 8 index will be stored in the same 6th partition.

What will be the performance if the query retrieves from both partition.

Since I am not going to drop the index before loading (assume I have partition the table along with 8 index) is there any performance degrade?.

Thanks


0
 
LVL 1

Expert Comment

by:jim144
ID: 8139653
You would want to make ALL the indexes local. What that does for you is when you do anything to that partition, only the indexes for THAT partition will be effected. If you drop the partition, all of the associated indexes will go with it. If your indexes are not local to the partition, and you drop the partition, move it, split it, etc, the action will make the indexes unusable for the entire table across all partitions. Another advantage .... you will no longer have to drop the indexes for the table. they will be built individually for the new partition. Partitioning a table will also allow you to take a portion of the table offline (say, for maintenance), without effecting the remainder of the table.

Hope this helps, good luck!
0
 
LVL 35

Accepted Solution

by:
Mark Geerlings earned 90 total points
ID: 8139697
Locally partitioned index segments *ARE NOT* stored in the same partition as the data.  They are stored in index partitions that have that same name as their corresponding table partitions, but for best performance and management the indexes are usually in separate tablespace(s) from the data and are usually on separate disks and/or controllers.

If you have 8 indexes that are all locally-partitioned matching the data, then when you add a new partition (and the data for it) new index partitions are created automatically for the new data.

Locally-partitioned indexes will help the most for queries that read from only one (or very few) partitions.  If most of your queries read from three or more partitions in a six-partition table, it may not help to have them locally-partitioned.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question