Sebastian
Sebastian

Reputation: 41

TokuDB: Index cardinality drops to zero

I use TokuDb from Percona on some of our db servers. I set up the db, add first chunks of data and every thing works fine.

After a while and adding millions of entries I notice a heavy lose in db performance. Turns out, the indexes of some tables have a cardinality of zero. This affects not all but mostly multiple tables at the same time.

The mysql error log list some problems like this

TokuDB: Auto running foreground analysis for [table_name], delta_activity 1827 is greater than 30 percent of 0 rows. - failed, likely a job already running.

So I try to disable the auto_analyze to prevent this problem. Now this log is not pushed anymore but the index cardinality is dropped again.

Tested solutions:

  1. I try to repair the indexes by executing

    ANALYZE table [table_name]
    

    and it works. But now after some days, the same problem is returning.

  2. Disabled auto_analyze by

    set tokudb_analyze_time = 0
    

System:

Tables are multiple times a day under heavy load for like an hour.

Upvotes: 1

Views: 211

Answers (0)

Related Questions