nosql - Lazy query response after Indexing views - CouchDB on Android Device -
i using couchdb in android application. my app syncs data online server. problem facing couchdb views when call view takes lot of time return resulted documents(even when includedocs(false)
). should cache view first time retrieval fast other times in future.
if run view on server side data cached automatically calling views android device causes delay in response. in case when data synced on android device, these views should fetch data localhost rather online - retrieval should fast localhost not.
might indices of localhost(android device) couchdb not indexed why everytime call view returns result after lot of delay. idea how resolve issue.
::i using ektorp api couchdb.
i'm afraid misusing views. these not adhoc queries build during program runtime build sql query. rather try thinking them database indexes, part of schema. design document(s) should updated when release new version of application in live environment.
try organize schema thinking ways need retrieve data. in end program finite number of types of queries. should prepare indexes upfront , query them during application runtime.
Comments
Post a Comment