Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
add comment

2 Answers

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

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
add comment

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

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

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

share|improve this answer
add comment

Your Answer

 
discard

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.