From f28bbc2a74de68578c3b6585e70dab840670c02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 13 Feb 2026 09:23:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:quotes=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20MySQL=20Out=20of=20sort=20memory=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - quotes(tenant_id, registration_date, id) 복합 인덱스 추가 - ORDER BY registration_date DESC, id DESC 정렬 시 filesort 제거 Co-Authored-By: Claude Opus 4.6 --- ...47_add_composite_index_to_quotes_table.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 database/migrations/2026_02_13_092247_add_composite_index_to_quotes_table.php diff --git a/database/migrations/2026_02_13_092247_add_composite_index_to_quotes_table.php b/database/migrations/2026_02_13_092247_add_composite_index_to_quotes_table.php new file mode 100644 index 0000000..dfc7c56 --- /dev/null +++ b/database/migrations/2026_02_13_092247_add_composite_index_to_quotes_table.php @@ -0,0 +1,28 @@ +index(['tenant_id', 'registration_date', 'id'], 'idx_quotes_tenant_registration_id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('quotes', function (Blueprint $table) { + $table->dropIndex('idx_quotes_tenant_registration_id'); + }); + } +};