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
{{ message }}
Repository navigation
Commit 53d939c
Browse filesBrowse the repository at this point in the historyBrowse files
* Scan each table once to check all columns
For every text column, search-replace ran a REGEXP query to look for
serialized data, which scans the whole table unless a match is found, and
then a LIKE query to count or replace the matches, which scans it again.
Reading the table dominates the cost of these queries, so on a large
wp_posts table this meant ~28 full scans.
Get the number of matching rows and whether there is serialized data for
all columns of a table in a single query instead. Columns without matches
are then skipped entirely, and dry runs use the counts directly. The SQL
or PHP handling of each column, and therefore the report, is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS
* Gather the column stats again after a write to the table
A write to one column can change other columns of the same table through
a BEFORE UPDATE trigger. The stats gathered up front could then be out of
date for later columns: serialized data was replaced in SQL, which
corrupts it, or a column with new matches was skipped. After each write,
the stats of the remaining columns are now gathered again in one query.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D26yjkN2BiqCXT6p6o1WqS
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments