You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an extreme case last week. After alter table using gh-ost, the table statistics was not updated until half an hour later, causing a lot of slow queries.
The root cause of this issue is that the statistical event for this table was lost while being placed in the asynchronous queue waiting waiting to be consumed by background statistics update thread.
This may be an extreme case, but since the collection of statististics is performed asynchronously in the background, it is very likely that there will be situations where the statistics are not updated for a period of time after gh-ost modification, especially when there are a large number of tables in the database.
I wrote a script to test gh-ost schema changes thousands of times, and it often happens that the table's statistics were updated 2-3 seconds after gh-ost renames the table. I'm thinking if gh-ost could collect statistics once before renaming table, in order to avoid the issue of statistics not being updated in time after the schema change.
I encountered an extreme case last week. After alter table using gh-ost, the table statistics was not updated until half an hour later, causing a lot of slow queries.
The root cause of this issue is that the statistical event for this table was lost while being placed in the asynchronous queue waiting waiting to be consumed by background statistics update thread.
This may be an extreme case, but since the collection of statististics is performed asynchronously in the background, it is very likely that there will be situations where the statistics are not updated for a period of time after gh-ost modification, especially when there are a large number of tables in the database.
I wrote a script to test gh-ost schema changes thousands of times, and it often happens that the table's statistics were updated 2-3 seconds after gh-ost renames the table. I'm thinking if gh-ost could collect statistics once before renaming table, in order to avoid the issue of statistics not being updated in time after the schema change.
part of test info below:
The text was updated successfully, but these errors were encountered: