2011/10/10 Håvard Wahl Kongsgård <haavard.kongsgaard@gmail.com>:
> Sorry, I stupid mistake. But I have been using psycopg for a year and
> I have some issue with memory usage on large cursors.
> Any tips on how to reduce the memory usage.
You can use server-side cursors, aka named cursors
<http://initd.org/psycopg/docs/usage.html#server-side-cursors>. In the
latest psycopg versions, iteration on the cursor (i.e. the "for record
in cur: ..." syntax) is more efficient than iterating with fetchone.
Everything is explained in the docs.
-- Daniele