0

I have one table in mysql. here is schema for that table.

TableName : LoginDet
~~~~~~~~~~~~~~~~~~~~
loginid    mediumint(8)   PrimaryKey AutoIncrement
logindate  timestamp      Not null  
userid     mediumint(8)   unsigned

Table's primaryKey (loginid) is a linked with some other table as foreign key. This table has already 15,00,000 records. Now I want to create range partition on this table on 'logindate' field. this field is not a part of primary Key. So my question is how can I create partition on 'logindate' without doing changes with primary key and foreign key?

Manish Sapkal
  • 5,591
  • 8
  • 45
  • 74
  • Please refer : http://stackoverflow.com/questions/2496140/partitioning-mysql-tables-that-has-foreign-keys and http://stackoverflow.com/questions/1537219/how-to-handle-foreign-key-while-partitioning – Jhanvi Oct 09 '13 at 10:35
  • thanks @Jhanvi, I have read what you suggest. I am not interested to do partition, but I am not getting performance. So, can you tell me how to optimize query? I am new in mysql. thanks agian :) – Manish Sapkal Oct 09 '13 at 10:49
  • @Jhanvi, one more small question. My database is hosted on Amazon RDS instance. Can we scale up this instance at our pick time? Do you have any idea about that? – Manish Sapkal Oct 09 '13 at 11:00
  • Sorry i dont have much idea about it. – Jhanvi Oct 09 '13 at 11:12

0 Answers0