On Tue, Jul 28, 2009 at 04:04:28PM -0400, Stef Telford wrote: > Oleg Broytmann wrote: >> Can I ask you do an experiment with a different program? What if you use >> sqlbuilder.Select() - a lower-level interface? How long it'd take to draw >> all these rows? > > Sorry, I have almost -0- experience with that low a level .. do you > have any nice canned example I could tailor to suit ?
Very easy: sqlbuilder.Select(list_of_columns), convert the expression to a string (SQL query), execute the query and get back the results: connection = connectionForURI('...') class Test(SQLObject): _connection = connection a = IntCol() b = IntCol() Test.createTable() Test(a=1, b=2) Test(a=2, b=1) for row in connection.queryAll(connection.sqlrepr( sqlbuilder.Select([Test.q.a, Test.q.b]))): print row In case you want to pass the list of columns as a list of strings - pass the list of tables for the FROM clause: Select(['a', 'b'], staticTables=['test']) Oleg. -- Oleg Broytmann http://phd.pp.ru/ p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss