Link to home
Start Free TrialLog in
Avatar of ssv1
ssv1

asked on

Oracle Index partitioning



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
 
Avatar of ssv1
ssv1

ASKER

I don't have much points.. Thats why I am giving 30...But  issue is important..
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
Avatar of Mark Geerlings
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.
Avatar of ssv1

ASKER

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.

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.
Avatar of ssv1

ASKER

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


Avatar of ssv1

ASKER

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


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!
ASKER CERTIFIED SOLUTION
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial