Batch insertion performance.

Aperta
#101 6 commenti 9 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
43/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
postgresql, rust, sql

Direzione di ricerca

Start with the benchmark changes in linked issue #98 and compare Cornucopia’s insert generation with the hand-tuned alternatives mentioned here. Then trace how inserts are generated and how parameters are handled, identifying where multi-row statements can fit while preserving streaming for cases that need it. Done when the appropriate inserts can use multi-row statements and benchmarks show the performance impact.

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

Descrizione

feature performance

Right now there's no way to perform multi-inserts. That means we have to call this

INSERT INTO table(...) VALUES (...)

multiple times, instead of calling that

INSERT INTO table(...) VALUES 
(...),
...
(...)

once.

There are cases where the former is better, notably when you are streaming your parameters, and/or they can't all fit in memory at once. But, typically, multi-row inserts are faster.

We should find a way to use multi-row statements where approriate.

From the benchmarks added here #98, it seems like this is our one major performance gap with hand-tuned postgres or diesel.

Lingua principale
Rust
Stelle
1.2k
Fork
77
Merge medio
5g 12h
PR unite (30g)
1

Preparare l'ambiente

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.

Altre issue di cornucopia-rs/cornucopia

Tutte le issue di cornucopia-rs/cornucopia

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.