Showing results for 
Search instead for 
Did you mean: 

Best practice for "Audit" properties

We have requirement to tag all nodes with created/modified by names and timestamps to understand when the node was created or modified. In some testing, I found that adding these 4 properties can cause longer query times depending on where the desired properties (not the audit properties) are in the property list in storage. If there are a lot of properties on lots of nodes in the cypher this can be significate.

We have looked at a couple of options

  1. Store the 4 properties in the node. This can have performance implications a noted above. In my testing if the data I'm needing happens to be stored in the storage list after these 4 properties it takes about twice as long to retrieve compared to them being accessed from the storage list before these 4 properties.

  2. Store in a separate node with a relationship back to the data node. 99% of the cypher will not follow this relationship to the audit data. This will perform better but requires more work to create and maintain in code.

I'm really curious how others have solved this requirement.