I’m running Couchbase server 4.0 community edition on two different nodes. Each nodes has 256MB of Index RAM and I use N1QL to query a bucket (which has 300MB RAM size) with 600000. I have created an index on a field name type with this command:

CREATE INDEX document_type ON bucket-test(type) USING GSI

and I have excecuted a simple query like this one:

select name from bucket-test where name like “%foo%” and type=“bar”;

but I got the documents very slowly (about 55s to get the result).

Have I done somenthing wrong in the configuration step or in the query? Is there any way to speed all up?

I would also like to know if there are some kind of advanced query function like the levenshtein distance or something similar to create some kind of ranking in the output result.

Hi @prasad,
thank you for your reply. The performance has gotten better but they are still slow (13s instead of 55s). I believe that it could be fault of the the like operator. Perhaps I’m using too much % symbols?