Skip to content

Commit 79537b7

Browse files
committed
Add index on crawl_queue.detected_at
This is useful to find URLs that were added during a crawl run.
1 parent 8604e10 commit 79537b7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/CrawlQueue.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public static function createTable() : void {
2828
'hashed_url',
2929
"CREATE UNIQUE INDEX hashed_url ON $table_name (hashed_url)"
3030
);
31+
32+
Controller::ensureIndex(
33+
$table_name,
34+
'detected_at',
35+
"CREATE INDEX detected_at ON $table_name (detected_at)"
36+
);
3137
}
3238

3339
public static function getTableName() : string {

0 commit comments

Comments
 (0)