Hi Dave,

labels are stored and queried quite efficiently as they are part of the
node-record.

Properties are stored separatedly in property-records via an indirection
and are also compressed, so that that they have to be unserialized on
access.

So if you have a fact / class / tag / boolean value that makes sense to
encode as label, then the label will be faster to query.

In your example I would add multiple labels, :Contact:Phone:Fax if you need
that information upfront, if you don't need it upfront you can just access
the appropriate property which would be null in that case.

Cheers, Michael



On Thu, Dec 8, 2016 at 2:11 AM, David Rader <[email protected]> wrote:

> What are the advantages/disadvantages of using properties vs labels as
> classifiers?
> I currently have a "type" property in some nodes. Wondering if the general
> rule should be using labels instead.
>
> An example:
> Have nodes labeled CONTACT for holding email, phones, IM, etc. One node
> for each identity (number, address, etc).
> Could have a set of T/F roles for home, work, mobile, preferred, other
> since any contact could serve multiple roles.
> Is it better to have a set of role properties or assign labels?  The
> property could later be expanded from T/F to days/hours of availability.
> The label couldn't be expanded.
>
> thanks,
> Dave
>
> --
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to