cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dodong Juan <>
Subject Doing joins between column familes
Date Wed, 26 May 2010 18:45:16 GMT

So I am not sure if you guys are familiar with OCM . Basically it is  
an ORM for Cassandra. Been testing it

So I have created model that has the following object relationship.  
OCM generates the code from this that allows me to do easy  
programmatic query from Java to Cassandra.


So my app gets the NODE and tries to query the dependency relationship  
from Node->Object4->Object3->Object2->Object1.

I have compared the performance between Cassandra(with OCM) vs DB2.  
The result is not very encouraging since the DB2 performance is  
showing at least 3X faster than Cassandra. DB2 basically is just a  
single call with a number of  inner joins ..

Looking at the code, I think we might get a better performance if  
somehow we can do the joins between objects within Cassandra server   
rather than the client side. Right now , I am basically doing the  

Node node = new Node(connection,"nodeidentifier");
node.loadInfo();                  // going to the wire ...?
node.loadObject4();         // this goes to the wire too ..
object4Keys = node.getObject4().getColumns.keys();
    object4Key = object4Key.nextElement();
    object4 = node.getObject4().get(object4Key);
    object4.loadInfo();                    // this goes to the wire  
too ..
    object4.loadObject3();           // this goes to the wire too ..
    object3Keys = object4.getObject3().getColumns.keys();
     object3Key = object3Key.nextElement();
     object3 = node.getObject4().get(object4Key);
    object3.loadInfo();              // this goes to the wire too ..
    object3.loadObject2();        // this goes to the wire too ..
    ... until you get object1//


I think there is a lot of going back and forth between the client and  
cassandra and if we can only move the relationship joins to Cassandra  
server I think we can minimize the latency and improve the overall  
performance on the query.

Is there a way to do a join across ColumnFamilies in Cassandra ?

View raw message