From 1564970e27330002832e16414e6951085ca76284 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 23 May 2022 14:45:54 -0700 Subject: [PATCH] CRM/Upgrade - Store snapshots with compression. More comments. --- CRM/Upgrade/Snapshot.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Upgrade/Snapshot.php b/CRM/Upgrade/Snapshot.php index 56bda5d002..442aed6de1 100644 --- a/CRM/Upgrade/Snapshot.php +++ b/CRM/Upgrade/Snapshot.php @@ -119,7 +119,8 @@ class CRM_Upgrade_Snapshot { 'MIN' => $offset, 'MAX' => $offset + $pageSize, ]); - $sqlAction = ($offset === 0) ? "CREATE TABLE {$destTable} AS " : "INSERT INTO {$destTable} "; + $sqlAction = ($offset === 0) ? "CREATE TABLE {$destTable} ROW_FORMAT=COMPRESSED AS " : "INSERT INTO {$destTable} "; + // Note: 'CREATE TABLE AS' implicitly preserves the character-set of the source-material, so we don't set that explicitly. yield new CRM_Queue_Task( [static::class, 'insertSnapshotTask'], [$sqlAction . $pageSelect->toSQL()], -- 2.25.1