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
|