On Wed, Jul 22, 2009 at 09:32:18PM -0400, Stef Telford wrote:
>    The bookings  
> -are- returned from one select/query via cursor but the bookings are not  
> contiguous (eg, booking 300, booking 310, booking 423, etc). This said,  
> I tried the select in psql and it worked in 19msec and then I tried from  
> psycopg2 cursor and it took 3 seconds.. so.. I have to ask, why is it  
> taking 23sec ?

   Can I ask you do an experiment with a different program? What if you use
sqlbuilder.Select() - a lower-level interface? How long it'd take to draw
all these rows?

>>>>    _SO_selectInit is a rather simple function - it populates the row with
>>>> values just fetched from the DB; the values are converted using calls to
>>>> to_python. Those to_python calls are fast (if we ca believe the profiler) -
>>>> see above. So where does _SO_selectInit spend its time?!
>>
> hrm. could it be tied to the Decimal init's ? I mean to say, if we are  
> seeing that those take a while to create, and each object has 10-14  
> Decimals inside it.. hrm

   But those __new__/__init__ must be called from .to_python(), and the
profiler has shown those .to_python() took very little time.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to