1

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

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

2 Answers 2

1

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

Anyways for Oracle, please see this link..

https://forums.oracle.com/forums/thread.jspa?threadID=879608

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

3
  • 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
1

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

https://stackoverflow.com/questions/8854095/mysql-partitioning-by-year-and-week

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.