I have the below N1QL Query witch i use in a grid to show user Data
SELECT meta(f).id as DocId, f.tract, f.PropertyAddress.houseNumber, f.PropertyAddress.streetName, t.name AS tract_name FROM Contacts AS f LEFT JOIN Contacts AS t ON t._type ="tract_info" AND ANY b IN t.tract_id SATISFIES b = f.tract END WHERE f._type="farm" order by f.PropertyAddress.streetName , TONUMBER(f.PropertyAddress.houseNumber) Limit 100 Offset 0
when i use this query with the order clause it take 3.5 sec to return Data against a 3K document set.
If i go and remove the order by clause it takes 250ms.
I created 2 indexes which i hoped would help
PropertyAddress.streetName , PropertyAddress.houseNumber) WHERE (
_type = “farm”)
) WHERE (_type
But it looks like it never uses any of these indexes