On Sat, Jul 19, 2008 at 02:52:04AM -0700, Sam's Lists wrote: > The Sqlobject docs make it sound like a select is an iterable item. > > But something as simple as: > > for x in TheTable.select(): > print x.Name > > insists on getting every record (200,000) from the database before starting > to print. > > Shouldn't it get one record, then print the name. Repeat 200,000 times? > > I'm using postgresql, if it matters.
Try if .lazyIter() helps: for x in TheTable.select().lazyIter(): print x.Name Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss