Slow Query Performance in PouchDB with Synced CouchDB Index
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- databases
Direzione di ricerca
La issue non fornisce alcun file del repository, test o punto di ingresso da cui iniziare. Riproduci la query in un browser con l’adattatore IndexedDB, confronta l’indice sincronizzato con un indice creato tramite createIndex() e ispeziona getIndexes(); l’attività è completata quando è stato identificato se viene utilizzato l’indice sincronizzato e il comportamento supportato è stato documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I am experiencing slow query performance in PouchDB despite using an index synced from CouchDB. Below are the details of my setup and the issue:
setup
This is my index in CouchDB
{
"_id": "_design/employee-index",
"_rev": "9-853ffb68171b1e78206646d0a63c22bc",
"language": "query",
"views": {
"residents-index": {
"map": {
"fields": {
"firstName": "asc",
"projectId": "asc"
},
"partial_filter_selector": {}
},
"reduce": "_count",
"options": {
"def": {
"fields": [
"firstName",
"projectId"
]
}
}
}
}
}
PouchDB sync
I have synced the above index from CouchDB to PouchDB.
The index appears in IndexedDB as pouch_employee_mrview. It has records.
Query
db.find({
selector: {
projectId: 'specificProjectId',
firstName: { $gte: null }
},
use_index: '_design/employee-index'
}).then(function (result) {
console.log(result.docs);
}).catch(function (err) {
console.error(err);
});
Issue
Despite using the use_index field in my query, the performance is still slow
Info
- Environment: browser (using pouchdb-browser)
- Platform: (Chrome/FF/Safari/Edge/iOS/Android/etc.)
- Adapter: indexeddb
- Server: CouchDB
My questions
- Since I have created the Index at CouchDB and synced with PouchDB, Is it not using the Index properly?
- Do I need to recreate the index using createIndex() from Pouch side? I queried the PouchDB index using getIndexes(). The index is available.
- If I edit any field on PouchDB, Will that warm up the Index automatically.
Hi @maintainer, I would greatly appreciate it if you could take a look at this issue at your earliest convenience. The slow query performance is significantly impacting our application’s performance, and any guidance or suggestions would be immensely helpful. Thank you!
- Lingua principale
- JavaScript
- Stelle
- 17.6k
- Fork
- 1.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/pouchdb
-
elemMatch throws TypeError: value is null if array has null elementForse già presa @henyanagar l’ha presa 144 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Validate database namesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
Tutte le issue di apache/pouchdb
Issue simili
-
curriculum documentation quality
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
githubnext/gh-aw-workshop#5367 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
HeyPuter/everything#187 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Animal Planet BGApertachannels:add check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 4 giorni
-
beginner blocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hiero-ledger/hiero-sdk-js#4670 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 61/100
I maintainer di solito rispondono entro 1 giorno