fix:quotes 목록 조회 시 MySQL Out of sort memory 에러 해결

- quotes(tenant_id, registration_date, id) 복합 인덱스 추가
- ORDER BY registration_date DESC, id DESC 정렬 시 filesort 제거

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 09:23:50 +09:00
parent 090a978991
commit f28bbc2a74

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('quotes', function (Blueprint $table) {
$table->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');
});
}
};