Rebuild: stats from a fixed-size sample, refreshed every 5 minutes, given up after 2
TABLESAMPLE SYSTEM (0.5) read 30 s of random pages on the HDD at 7M releases, growing with the catalog; a refresh that never finished kept the header's totals 3.5 hours old (it blocked every later refresh). Now TABLESAMPLE SYSTEM_ROWS (5000) (tsm_system_rows), every 5 minutes, and a refresh is given up after 2 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f642a49d7d
commit
99fffe30f4
2 files changed
+23
-5
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema'
|
||||
|
||||
/** TABLESAMPLE SYSTEM_ROWS: the stats' sample of the catalog at a fixed size (a percentage read 30 s of random pages on the HDD at 7M releases). */
|
||||
export default class extends BaseSchema {
|
||||
async up() {
|
||||
this.schema.raw(`CREATE EXTENSION IF NOT EXISTS tsm_system_rows`)
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.raw(`DROP EXTENSION IF EXISTS tsm_system_rows`)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user