cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Missing Label Indexes

alex3
Node Clone

Hi,

I recently noticed that simple label lookups like

MATCH (n:Resource) RETURN n LIMIT 5

Take very long. When I ran PROFILE, I noticed that all label lookups were doing AllNodesScan instead of NodeByLabelScan. I don't recall deleting any special indexes for node labels, but if I did, is there a way to recreate them to get fast NodeByLabelScan lookups again?

1 ACCEPTED SOLUTION

Hi @alex3 ,

Can you execute

CREATE LOOKUP INDEX node_label for (n) on each labels(n)

 and then retry?

Bennu 

Oh, y’all wanted a twist, ey?

View solution in original post

4 REPLIES 4

alex3
Node Clone

An update on this. I have tried creating a few nodes of a new label :TestLabel, and finding nodes of that label does not use the NodeByLabelScan for search. So it appears somehow the functionality is broken for the DBMS. Restarting has not fixed it.

Hi @alex3,

That's kinda weird. What version are you using? 

Oh, y’all wanted a twist, ey?

Hi @alex3 ,

Can you execute

CREATE LOOKUP INDEX node_label for (n) on each labels(n)

 and then retry?

Bennu 

Oh, y’all wanted a twist, ey?

Fixed!!! Thank you so much.