Hi, 

I'm currently trying to improve my DB performance by reducing the number of 
queries and associated overhead while grabbing some SQLObjects from the DB.  I 
would like to have SQLObject fully populate the object graph for the objects 
I'm using since all joined objects will be read every time this object is 
loaded.

Here are prototypes for my objects

class A (SQLObject):
    x = IntCol()
    bees = MultipleJoin('B', joinColumn = 'a_id', orderBy='display_order')
    cees = MultipleJoin('C',  joinColumn = 'a_id', orderBy='display_order')

class B (SQLObject):
    y = IntCol()
    display_order = IntCol()
    dees = MultipleJoin('D',  joinColumn = 'b_id')
    a = ForeignKey('A')

class C (SQLObject):
    z = IntCol()
    display_order = IntCol()
    a = ForeignKey('A')

class D (SQLObject):
   m = IntCol()
   b = ForeignKey('B')


Is there any way using SQLObject I can reduce the number of queries from 
1+(1+count_b) + (1+count_c) +(1+count_d)*count_b to something closer to 1 query?

Thanks in advance, 

Simon
------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to