move mySQL 5.6/InnoDB tables to a different physical location
1
vote
1
answer
186
views
I was wondering if this is possible with mysql 5.6.
I have a Database with several tables separated by Month (eg TonsOfRows_201411). I don't need access over the whole data so I decided to separate tables instead of partitioning.
The current month is always used for importing/queries (we are talking some 100m rows per month) so I'd like to put the current table on a SSD and then archive it to a slower HDD afterwards (I still need to run queries on it, r/o only)
In postgresql I create a tablespace with different physical location and can change the tablespace later on, so I can move around the table.
I havent found a 'datadir' option in the mysql tablespaces, so not sure if I can solve it via mySQL tablespaces.
I have found a 'datadir' for InnoDB, the problem is alter table doesn't support a change of the datadir (datadir is ignored for alter table), so not sure how to change it.
So I was wondering if its possible to change the datadir of a mysql table after you have created it (with mySQL commands)?
One solution would be symbolic links, but according to the Docu this is not supported for innoDB (nevertheless it is working, but i really prefer a SQL only solution here)
Your help is appreciated, I am sure I am missing something here.
Asked by Chris
(183 rep)
Jan 6, 2015, 01:57 PM
Last activity: Apr 3, 2023, 03:59 PM
Last activity: Apr 3, 2023, 03:59 PM