To improve query performance

Hi CB Team,

Since we are dealing with large amount of data we running in situation where N1QL query is timing out.

To improve a query performance we are thinking to use “Shard”, So when query run it should be look to specific Data service node to fetch data.

There is any latest document / suggestion ?

Chouchbase already does shard by document key on all data nodes.
Unless you give query it is very difficult to suggest.

  1. If you already know document keys use SDK to get the data. SDK already knows optimally get the document from data service in single lookup
  2. If not. Use covered query and get the document keys and do asynchronous SDK calls get data from data service to avoid 2-hops (Data—>N1QL—>Client)
  3. Use EE partition index
  4. See if you can use query optimization.
  5. Try split the query into range of data and repeat.
  6. See if you can increase timeout

Thank your for your reply.
Now one more question i have a document where we have around 13 fields, and index been crated on almost 5 fields, do you think performance wise it’s cause any issue , or any suggestion ?

It depends on queries. Composite index more fields means index is wider and i/o etc.

Read through

good morning ,
I have one intersting question , from n1ql Query prosprective if i select list of data and simtonouesly
update the one field in that document, cause issue or it’s possible ?