Hi Chandra, the read performance for cases 1 and 2 will likely be comparable. The real advantage of having a hierarchy of nodes is to have a place where you can store aggregate information instead of re-traversing all the tree to recalculate that every time. Could you shed some light on your domain model? Maybe we can give you some specific advice...
Thanks Luigi 2015-11-28 7:04 GMT+01:00 Chandra <[email protected]>: > Hello all > > While trying to model my data to use OrientDB's Document database, I > am conflicted between employing two alternative strategies in trying to > fasten read times. Penalty due to higher read times is quite large and > hence my concern. > > 1. In the traditional approach, employ indexing on this table and query > for a combination of columns such as userID, date, type of record to narrow > down to one particular record. Ideally, I should have architected the model > to employ least such combination but due to reasons such as simplicity and > resource constraints, I had to resort to this style. If I were to use this, > I could employ a composite index for this combination and fetch records. > > 2. Alternatively, I was wondering if I can make use of Record ID mapping. > Let's say, if I can manage to architect a mapping that can help me navigate > my way through the search combination (UserID >> date >> type) using a > separate document class(es), I might be able to reach the record > straightaway by navigating this path. Of course, I will have to create and > retain map for each record that gets created, but I guess I can live that > if my read times are better using this approach. I can additionally > provision CRC if deemed necessary. > > Has anybody been through this path? If yes, what was the overall > experience? I employ JAVA API for record creation and fetching. > > thanks > Chandra > > -- > > --- > 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. > -- --- 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.
