由于在我的离子应用程序中用Pouchdb替换Mongodb,应用程序感觉有点迟钝,我想知道是否有办法加快速度。我们所讨论的数据库目前包含的文档少于100个,即使使用纯粹是本地的,也很慢。我们正在使用二级索引。这是性能下降的原因吗?我们最好使用allDocs()
然后手动搜索数据库吗?我看过它会更快,但帖子已经超过一年了,事情可能已经改变了。我也尝试使用websql适配器,但它并没有真正影响速度。它们是我可以尝试的其他适配器或东西吗?
答案 0 :(得分:0)
On such a small database, a secondary index would not be faster than allDocs in my experience. But I would not think the performance difference would be noticeable (I have used both on a small local database). You might try "compacting" the databases regularly if you have not already as this can make the database size smaller and more efficient. Like you, I have tried different adapters (IndexDb and websql) but could not see much difference in speed.