On Mon, 17 Mar 2008 15:55:03 +0300, Oleg Broytmann wrote: > On Mon, Mar 17, 2008 at 03:51:47PM +0300, Oleg Broytmann wrote: >> BTW, SelectResults (i.e., the result of calling .select()) has >> .lazyIter() method that returns an iterator that inside its .next >> () method >> calls cursor.fetchone() instead of .fetchall(). So you can try >> >> for row in MyTable.select(condition).lazyIter(): >> process(row) > > The problem with this approach is that all fetched rows are put > into > SQLObject's cache, so that process() must clear the cache from time to > time: > > MyTable._connection.cache.clear() >
I think that cursor objects has all result sets as list in it even when i use cursor.fetchone(). So it would be still the cause of swapping out. -- masayuki takagi ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss