Hello,
I have the below query running
select * from <bucket> where type = <doc_type> and <field_name> = <value>
ORDER by meta().id
OFFSET 1000 LIMIT 100
This query is taking few secs to execute and if I remove the order by clause, the same query takes a few milliseconds to run. See below:
select * from <bucket> where type = <doc_type> and <field_name> = <value>
OFFSET 1000 LIMIT 100
I would want to use order by to make sure whenever I do offset I am slicing records that were returned in the same order.
Question: If I run the query without order by, does Couchbase returns the records in a specific order?
What do you suggest?
PS: Logically I don’t need an order. Only reason I am ordering is to make sure before doing an offset records are ordered.