feat(database,performance): optimize indexing and processing for statement export

- Menambahkan indeks baru pada table `stmt_entry`:
  - Kombinasi indeks untuk kolom `account_number` dan `booking_date`.
  - Indeks untuk kolom `date_time`.
  - Indeks untuk kolom `trans_reference`.
- Memperbesar ukuran chunk processing di `ExportStatementJob` dari 500 menjadi 1000 untuk mengoptimalkan performa proses ekspor data dan mengurangi overhead.

Perubahan ini bertujuan untuk meningkatkan efisiensi query pada table `stmt_entry` dan mengurangi waktu proses pada job ekspor pernyataan.
This commit is contained in:
daengdeni
2025-05-23 10:17:42 +07:00
parent d66afb36c7
commit b54fabd416
2 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
<?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('stmt_entry', function (Blueprint $table) {
$table->index(['account_number', 'booking_date']);
$table->index(['date_time']);
$table->index(['trans_reference']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};