Can n1ql performed without an index?


#1

Hi,

We are having high cpu & ram issues with data servers since a few hours ago. I’ve dropped all the indexes from a bucket to rule out any possible issues, but I’m still seeing n1ql queries under Data Buckets -> click on bucket -> Summary tab. Is this expected?

When I try to run a query in cbq, I get an error as expected.


#2

There are a few queries you could run in N1QL without any indexes in the system.

  • queries with USE KEYS

SELECT * FROM bucket USE KEYS […,…,…];

  • queries in system: space.

SELECT * FROM system:keyspaces;

do you have some of these in the system?
thanks
-cihan


#3

Hi cihangirb,

I think I found out what’s going on.

We have two buckets. One of them uses n1ql a lot. The bucket I’m talking about does not have an index. It looks like the Summary tab shows # of queries from the other bucket. I’m not sure if it is a good idea to display # of queries from other buckets, but it also makes a little sense as n1ql can join buckets.


#4

Aha! That is correct.
N1QL stats isn’t sliced across buckets easily as N1QL can execute queries across buckets so N1QL query execution stats are global to the cluster.