Can you figure out why .select(processor=...) is slower than .executesql()?
At least for iterating over the rows, they appear to do the same thing. Is
there just a small fixed difference between the two that remains nearly the
same no matter how long the overall processing takes?
Also, note that your .executesql() testing times should include the
following code in order to be comparable with the .select() examples:
selection = [db[tableName].ALL for tableName in tableNames]
sql = db(query)._select(*selection)
sql_colnames = sql.split(' FROM')[0][7:].split(', ')
Those lines are used only by the .executesql() examples, and should
therefore not be excluded from the timings.
But this is using just simple string-based fields... It goes way-up from
> there when you introduce other data-types.
>
Of course, when you're selecting other data types from the database, you
typically need them to be parsed anyway. If we implement some kind of
faster parsing functionality, we should probably enable options to specify
which data types to parse. A result set with zero parsing of any data types
may be very fast, but then very inconvenient to work with (and may require
manual parsing, eliminating the initial speed benefits).
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.