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

  • What is your table definition? Primary key, other indexes, typical queries, expected workload (read/write)? Jan 23, 2013 at 12:14

2 Answers 2


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

  • nice answer. i've done this in informix as well.
    – grassbl8d
    Jan 23, 2013 at 12:09
  • Note the "mysql" tag for the question. Good answer though! Jan 24, 2013 at 7:08
  • yeah i just noticed the mysql tag, sorry about that lol
    – Avias
    Jan 24, 2013 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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