Skip to main content

Is there a reason why ctime column on data_bin table is not indexed?

Without indexes partitioning and purging requires a full table scan, and with performance metrics collection this table can get _extremely_ large which makes aforementioned tasks very slow, I am  now watching a purge processwhich has been running several days now ..

Hello

you should enable partitionning on the data_bin table

this is made especially to allow ffor quick purging as the partitionning is done on the ctime column

and it why it is not indexed, the partitionning is doing it implicitly

 

I would suggest you to enable partitionning, here is a procedure to migrate to a partitionned database : Database partitioning | Centreon Documentation

 


Partitioning is enabled, tasks are super slow regardless


mmh that is extremely strange, when you go in Platform status /  Databases, do you have something like this : 

 

as you can see I have around 500Mb per partition, for 19k services

 

the log is saying it take 7 sec to purge every day

 


I think he is deleting rows by hands not purging by dropping partition.

That’s why it takes ages.

@thakala you are not supposed to do this way, you must set your retention here :  Administration  >  Parameters  >  Options

and wait the crontab to run and drop the old partitions.


Reply