Understood, thanks :)

Michael

On Friday, May 2, 2014 4:17:35 PM UTC+2, Michael Hunger wrote:
>
> In the first case it adds the label to the node record and the node to the 
> label-node-index which it then uses for search
>
> In the second case it searches all nodes with that label, has to load 
> their properties and check the property for the value on each node
>
> So in my experience the first approach is faster
>
> But still a global operation
>
> Sent from mobile device
>
> Am 02.05.2014 um 15:27 schrieb Michael Azerhad 
> <michael...@gmail.com<javascript:>
> >:
>
> Suppose a "Notification" entity.
> To keep thing simple, let's assume a single property: "*readFlag*", that 
> could be *true* if the notification was already read by the client, or 
> *false* if it is new or not checked by the client yet.
>
> What is the difference in term of performance between those both ways to 
> retrieve *read notifications?*:
>
>
>    - Set a label on the "*Notification*" node called "*ReadNotification*" 
>    and query them using:  *MATCH(r:ReadNotification) return r  *
>    - *Index* the "*readFlag*" property of the "*Notification*" node 
>    without needing a label.  Query would be:  *MATCH(n:Notification) 
>    WHERE n.read = true return n*             
>
>
> Are both ways very similar? Which one should I choose?
>
> Thanks a lot,
>
> Michael
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to neo4j+un...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to