Performance Improvement in n1ql query with LIMIT clause?

Hi CB Forum Members,

If a n1ql responds 2 million records in 100 seconds, then if I use LIMIT clause at the end of the query to restrict number of documents to 100, then will it reduce overall response time of the query?

Regards,
Pratik Mehta

If you don’t have ORDER BY yes.
Once you have order by you need to see where bottleneck. Order (it must materialize all the results ) or results set size sent to client.