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