Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Sohel.

Asked: October 03, 2016 - 4:08 am UTC

Last updated: October 03, 2016 - 12:07 pm UTC

Version: oracle12c

Viewed 1000+ times

You Asked

Hi Team,

I want to tune table consisting millions of records. So i want to do partitions based on date column. My primary key in table is currently log id (transaction id).

I want to use hash partitioning on date column.

Can you tell me what is best approach to tune that table? Also please tell me what key should i user global or local?

Regards,
Sohel

and Connor said...

"So i want to do partitions based on date column"

Why ? You need a *justification*, a reason that you would act on. Just because a table is big does not automatically mean it should be partitioned. The way you intend to *use* the table has a much larger bearing.

"I want to use hash partitioning on date column"

Why ?

"Also please tell me what key should i user global or local?"

It depends. If local was *always* better, we would phase out global indexes, and vice versa.

Not trying to be curt, but I'd strongly advise having a reasonable good read on the concepts and then use that knowledge to make a practical decision

http://docs.oracle.com/database/121/VLDBG/GUID-EA7EF5CB-DD49-43AF-889A-F83AAC0D7D51.htm#VLDBG002


Is this answer out of date? If it is, please let us know via a Comment

More to Explore

VLDB

If you are new to partitioning, check out Connor McDonald's introduction series here.

VLDB

Documentation set on VLDB and Partitioning.