Couchbase + N1QL

Asked

Viewed 53 times

1

In a bank of approximately 300,000 records, the query below:

SELECT count(usuario) FROM analytics where datahora.entrada >= '2016-11-18T00:00:00.000Z' and datahora.entrada <= '2016-11-18T99:99:99.999Z' limit 5000

it takes approximately 1 min, using n1ql would it be possible to optimize it using indices? I tried to do as below but did not have an effect

CREATE INDEX `ANALYTICS_datahora-entrada` ON `analytics`((`datahora`.`entrada`)) WHERE (`_type` = "analytics") USING GSI

1 answer

0

We used this bank in an application of utmost importance to our client. Unfortunately we had endless problems. This sync stops working from nothing, when you least expect the rate building occurs consuming 100% if cpu and leaving the application dead. We have the Enterprise license. We switched our architecture to SQL and our system got extremely better and performative. Evaluate the possibility of not using this bank, certainly when you need it most it will leave you in the hand.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.