Sample Header Ad - 728x90

How do I truncate performance_schema tables on a read replica?

0 votes
1 answer
898 views
On occasion, you have to truncate events_statements_summary_by_digest, when it's hit the row limit. On a write master, this is easy, but on a read replica, there doesn't seem to be a way to do it. The read-only enforcement extends to the performance_schema tables. Since the data are created locally, it seems to me that there'd be a way that I could exempt those tables (or even the entire performance_schema DB) from the read-only enforcement? I have already set the performance_schema_events_statements_history_long_size to 10000, which is getting pretty large. I could set it larger (well, if it weren't read-only), but the size of that table affects overall system performance, and I'd rather not just crank the limit to something obscene - especially when so many of the entries in the history haven't been used in a mont or two. It's better to toss out the garbage.
Asked by Sniggerfardimungus (101 rep)
Apr 18, 2018, 08:47 PM
Last activity: Jun 28, 2025, 04:03 PM