On Jan 9, 2007, at 5:24 AM, Michele Petrazzo wrote:
> Because, like what I wrote on the psycopg2 ml (lists.initd.org/ 
> pipermail/psycopg/2007-January/005250.html)
> without the "server side cursor", the memory usage on the client  
> side is proportionally at the number of records returned by the  
> query (on my example 400k records, 60MB ram). I think because the  
> driver fetch all the data from the server and leave it available  
> with the fetchXXX methods.

really ?  im not sure about psycopg2 specifically, but its been my  
experience with virtually all database client libraries that as you  
fetch rows and discard them, you only pull as much as you fetch into  
memory.  i.e. if you had a resultset of 4000 rows and just fetched 5  
rows, only 5 rows get pulled over the wire.  thats definitely how the  
lower level APIs work and it would be pretty bad if psycopg2 didnt  
maintain that behavior.




--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to