Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table with hundreds of thousands of records. How to partition the table, week-wise?

A few million rows insertion will be taking place in my table in a day.So i need to partition it weekly. There is a datetime column which I want to partition by weekly

share|improve this question
What is your table definition? Primary key, other indexes, typical queries, expected workload (read/write)? – dezso Jan 23 '13 at 12:14

First of all what kind of database are you using? And are you referring to table partitioning?

Anyways for Oracle, please see this link..

I'm not too sure about how this would be done in PostgreSQL, but I think partitioning is much less relevant for PostgreSQL rather than for Oracle

share|improve this answer
nice answer. i've done this in informix as well. – grassbl8d Jan 23 '13 at 12:09
Note the "mysql" tag for the question. Good answer though! – Shlomi Noach Jan 24 '13 at 7:08
yeah i just noticed the mysql tag, sorry about that lol – Avias Jan 24 '13 at 8:00

For mysql, i think you can use this as a reference:

for informix, interval partitioning is available as I have had experience with this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.