I currently have a huge environment which is using a MySQL server that does not have any table partitioned setup whatsoever.
That server is running slow, as we started with a Virtual Machine, and we are now migrating this old DB to a more robust/powerfull physical server with more memory, CPU and newer version of MySQL as well.
I am going to use table partitioning this time, for history and trends tables, as mostly advice, and i would like to get some feedback on how to do the data load.
I'm taking a full backup of the database using myDumper tool, which is just a multi-threaded MySQL dumper, and the import with myLoader, which does almost the same, and uses DATA LOAD INFILE.
My question is regarding whatever is preferable to setup the database partitions PRIOR to do the data load (i would have to alter the schema table creation of course) or just load all the data in 1 partition and then do the partitioning manually after the import is complete.
The reason I am asking is because I still unsure if doing the import with partitioning tables is possible or not and that it will end up with valid data stored on each different partitions, of course I'm aware that i will need to create the valid partitions to store all the data, based on min/max values of clock field.
In regards to benefits, I'm afraid that if i do the table partitioning afterwards it will take a huge amount of time to move the data to their corresponding partitions and i will end up with a dirty table which was moved all over the place.
Any feedback on this matter would be greatly appreciated.
That server is running slow, as we started with a Virtual Machine, and we are now migrating this old DB to a more robust/powerfull physical server with more memory, CPU and newer version of MySQL as well.
I am going to use table partitioning this time, for history and trends tables, as mostly advice, and i would like to get some feedback on how to do the data load.
I'm taking a full backup of the database using myDumper tool, which is just a multi-threaded MySQL dumper, and the import with myLoader, which does almost the same, and uses DATA LOAD INFILE.
My question is regarding whatever is preferable to setup the database partitions PRIOR to do the data load (i would have to alter the schema table creation of course) or just load all the data in 1 partition and then do the partitioning manually after the import is complete.
The reason I am asking is because I still unsure if doing the import with partitioning tables is possible or not and that it will end up with valid data stored on each different partitions, of course I'm aware that i will need to create the valid partitions to store all the data, based on min/max values of clock field.
In regards to benefits, I'm afraid that if i do the table partitioning afterwards it will take a huge amount of time to move the data to their corresponding partitions and i will end up with a dirty table which was moved all over the place.
Any feedback on this matter would be greatly appreciated.
Comment