graphprotocol / graphprotocol/graph-node

[Feature] graphman should automatically run ANALYZE after creating indexes

Aperta
#5,185 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement indexer experience ops Stale
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

Description

When creating multicolumn indexes, a subsequent ANALYZE is needed so that Postgres collects the necessary statistics and makes the freshly created index available for the query planner. Therefore, it's a good idea to teach graphman to automatically run ANALYZE after such index creations.

What's more, it also seems to be a good idea to always run ANALYZE after any index creation - after all, we create indexes to address performance issues, and fresh statistics (obtained by ANALYZE) also often help with such problems. This will make the implementation easier as a side effect, I believe.

An optional sub-feature might be the ability to turn it off when creating multiple indexes one after another on the same table. We have to consider here that index creation usually takes several minutes, whereas a typical ANALYZE finishes somewhere between 4 and 15 seconds.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando il flusso di creazione degli indici di graphman e il modo in cui esegue le operazioni PostgreSQL. Determina dove dovrebbe essere eseguito ANALYZE dopo la creazione di un indice, incluso il comportamento quando più indici hanno come destinazione la stessa tabella; il lavoro è completo quando le statistiche aggiornate vengono raccolte in modo coerente senza interrompere la creazione degli indici.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
postgres, rust
Ambito
cli, databases
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.