With N1QL queries being executed on the Couchbase server, what is the cost (on performance) of running such queries?


#1

Appreciate if the cost can be defined for example with 100GB of data in one bucket if we run a query what the performance cost is??


#2

We cannot answer this in the abstract. Several factors to consider:

  • the query must scan a view index
  • the amount of data scanned and processed by the query depends on the selectivity of the WHERE clause
  • the amount of query computation depends on the query–e.g. aggregation, sorting, joins, document traversal, transformation, etc.

When you try out N1QL on your own data and queries, be sure to use the CREATE INDEX and EXPLAIN statements to ensure that your queries are using a suitable index.