You mean using the generated SQL command to fire execute_sql and returns as
a named tuple?

>>> db(db.query).raw_select()

it is the same as doing

command = db(db.query)._select()
result = db.execute_sql(command)

On Thu, Feb 9, 2012 at 4:51 PM, nick name <i.like.privacy....@gmail.com>wrote:

> One of my controllers need to go through a lot of records to provide a
> meaningful answer -- as in, 60k records.
>
> Just loading them from the database takes about 100ms
> (db.executesql("select * from table order by id;")); Doing the same through
> DAL takes over 6 seconds. I realize that the DAL does do a lot of
> additional work, which in general is helpful -- but I can do without all
> the parsing / Rows() generation for this.
>
> What do people here think about adding a db.rawselect(...), which is a
> slim rapper for db.executesql(db._select()) .... that wraps everything with
> a named tuple? It solves most of the speed problem when it is needed, but
> still maintains a lot of the features of the SQL DAL processing.
>
>


-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to