Great explanation. 

I am not at all a Java programmer and I am also learning ODB and graph 
databases, so I can only suggest what might be a problem or rather point to 
what I think might be a problem. So, take what I say with a grain of salt.

Is there a particular reason to split the accounts from the two profile 
types? If the relationships are always direct, I'd not waste edges on 
connecting them. I'd have the profiles as subdocuments of the account. That 
will speed the retrieval of the profile data a lot. 

For retrieving data, do you really need a transaction? Transactions are 
definitely more costly from a performance perspective. I mean, would it 
matter if a person sees partially old data in your system? I would imagine 
it isn't too critical. 

Also, from a data querying perspective, constantly hitting the database in 
a loop is going to be slower than finding a proper query, which gets you 
the data you need in one shot (in most cases). To be honest, I am not sure 
that is actually happening, but from the code, that seems like what is 
happening. Unfortunately, I can't help you on a better query. I am not that 
good at the Java API. 

Hopefully Luca or Luigi can offer some better tips and sorry I can't offer 
more of help.

Scott




-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to