Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-21-2019 01:26 PM
Hello,
Is there a restriction on the number of properties we can have for a given node?
03-21-2019 05:36 PM
I'm not aware of any hard restrictions, however any specific property access must linearly iterate over the properties of the node/rel until the correct property key is found.
For queries that must filter by property or otherwise perform specific property lookup, when the number of nodes to consider during the execution of the query is high and the number of properties on nodes is high, you may see this affect execution time.
03-22-2019 04:38 AM
Seconding @andrew.bowman there isn't a hard limit. HOWEVER -- creating an overly large number of properties on a node is not a good idea for several reasons -- Andrew gave one affecting execution time.
If a node has a large (say, > 12) number of properties, it's common to see that a modeling error somewhere else has been made. For example, imagine a Car node like this:
(:Car {
color: 'red',
make: 'Toyota',
model: 'Camry',
year: '2017',
stereo: 'premium'
(40 other properties about car features)
})
In this case the user will think they need lots of properties to capture all of this data, and they do need to capture that data -- but excessive properties are defeating the graph model and they might be better off factoring those properties out into separate nodes via relationships.
All the sessions of the conference are now available online