Hi all,

I have been experimenting with an OrientDB setup (version 2.1.0) and 
noticed a very large difference in performance when passing in an OType 
parameter to a LINKSET vs leaving it out.
Example:

OClass logItem = schema.createClass("log_item");
logItem.createProperty("timestamp", OType.DATETIME);
logItem.createProperty("message", OType.STRING);

OClass log = schema.createClass("log");
log.createProperty("name", OType.STRING);

and

log.createProperty("log_items", OType.LINKSET, logItem);
VS
log.createProperty("log_items", OType.LINKSET);

I tested inserting 1 log and 1000 log items into the log.
i.e.
// log = Get the log...
ODocument logItem = new ODocument("log_item");
logItem.field("timestamp", new Date());
logItem.field("message", "Hello World");
logItem.save();


Set<OIdentifiable> logItems = log.field("log_items");
logItems.add(logItem.getIdentity());
log.save();


WITH OClass param        => 38.8 seconds
WITHOUT OClass param => 1.5 seconds

Can anyone tell me the difference here? Why are updates so much faster when 
I DON'T add the OClass parameter. Is there a reason why I want to leave it 
in?

-- 

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

Reply via email to