Slow Query Performance in PouchDB with Synced CouchDB Index
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- databases
調査の方向性
この issue には、開始するためのリポジトリファイル、テスト、エントリポイントがありません。IndexedDB アダプターを使用してブラウザーでクエリを再現し、同期されたインデックスと createIndex() を介して作成したインデックスを比較し、getIndexes() を調べます。同期されたインデックスが使用されているかを特定し、サポートされる動作を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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!
- 主要言語
- JavaScript
- スター
- 17.6k
- フォーク
- 1.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/pouchdb のほかの issue
-
elemMatch throws TypeError: value is null if array has null element対応中かも @henyanagar が 144 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
OWASP/CheatSheetSeries#2905 ·
メンテナーはふだん 1 日以内に返信
-
desktop enhancement P2
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
AllTheMods/ATM10-Aeronautics#159 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ComposioHQ/composio#5249 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
zilliztech/memsearch#838 ·
メンテナーはふだん 1 日以内に返信