Skip to content

Commit

Permalink
Update indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Dec 1, 2023
1 parent d60f11b commit 764d704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/migrations/2023_06_07_000001_create_pulse_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function up(): void
$table->index('timestamp'); // For trimming...
$table->index('type'); // For purging...
$table->index('key_hash'); // For mapping...
$table->index(['timestamp', 'type', 'key_hash', 'value']); // TODO: This is a guess...
$table->index(['timestamp', 'type', 'key_hash', 'value']); // For aggregate queries...
});

Schema::create('pulse_aggregates', function (Blueprint $table) {
Expand All @@ -58,7 +58,7 @@ public function up(): void
$table->unique(['bucket', 'period', 'type', 'aggregate', 'key_hash']); // Force "on duplicate update"...
$table->index(['period', 'bucket']); // For trimming...
$table->index('type'); // For purging...
$table->index(['period', 'bucket', 'type']); // TODO: This is a guess...
$table->index(['period', 'type', 'aggregate', 'bucket']); // For aggregate queries...
});
}

Expand Down

0 comments on commit 764d704

Please sign in to comment.