I have an index on: Label (Uid) and: Label (Name)
However, when I profile (in the shell) the following two requests, I get the same code for both. The problem is that I have 700,000 items: Shortcut, and it starts painfully slowly ordering items.
The order of queries using a property with an index:
MATCH (item:Label) RETURN item.Name ORDER BY item.Name SKIP 1000 LIMIT 50
The order of a query using a property without an index:
MATCH (item:Label) RETURN item.Name ORDER BY item.Created SKIP 1000 LIMIT 50
The profiler gets me (almost) the same thing for both, only the parameters change:
==> ColumnFilter(symKeys=["item", "item.Name", " UNNAMEDS885193287"], returnItemNames=["item.Name"], _rows=30, _db_hits=0) ==> Slice(skip="Literal(1000)", _rows=30, _db_hits=0) ==> Top(orderBy=["SortItem(Cached( UNNAMEDS885193287 of type Any),true)"], limit="Add(Literal(1000),Literal(50))", _rows=1030, _db_hits=0) ==> Extract(symKeys=["item"], exprKeys=["item.Name", " UNNAMEDS885193287"], _rows=768596, _db_hits=1537192) ==> NodeByLabel(identifier="item", _db_hits=0, _rows=768596, label="Label", identifiers=["item"], producer="NodeByLabel")