Start a Conversation

Unsolved

This post is more than 5 years old

629

September 5th, 2013 12:00

W4N DB split process

I am curious who has performed a DB split after the fact and is using the loab-balancer in the configuration? I have perfromed the split several times and I am trying to shorten the process by purging the unwanted data in the split databases without having to wait for the retention policy to kick in. In my splits I have adjusted the retention policy to 1 day and that didnt help.

In my example I have a DB that is 500GB and I have  physical server with 1TB drive. I am unable to add storage. I need to split into 4 DBs. I take my 500GB copy and move it to a location where I have enough space (3TB) and I perform my deletes to the reference data. I am left with 4-500GB DBs, which will not fit back on my original 1TB server, however it will after the "purge" of the unwanted data happens in 30 days(according to the documented retention policy).

How do i get the 4 DBs to shrink to fit?

September 6th, 2013 21:00

Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility.  Questions written to the users' own "Discussions" space don't get the same amount of attention and questions can go unanswered for a long time. 

You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Ionix Support Forum" which would be the most relevant for this question.  I am seeing most of the Watch4Net questions being posted and answered in that community.

March 3rd, 2015 09:00

Pretty old question, but if anyone else has the same problem here is how we performed that:

made list of tables, echoed into textfile SQL commands:  delete from

where variable not in (select id from data_variable) ); Then splitted the list of SQL commands into smaller chunks and sent the SQL commands to the database.

Then you have to run optimize to actually shrink the space on the disk.:

optimize table

  

As we needed space fast, we sorted MYD filenames from biggest to smallest and we ran the optmizie table from top - our 800GB database was splitted to 4 200Gb this way (from 2.2M metrics to approx 600k in each).

Have Fun

No Events found!

Top