On 14/06/2011 15:12, Massimo Di Pierro wrote:
How many records does it return?
192 in the first case and 360 in the second
this is a tipical row extracted converted in csv:
2010-11-29;2010-12-01 01:00:00;4368.96;4854.3;60
so there's one date, one datetime, two float and one integer
how can I made it more usable? Do I have to limit someway the query?
thaks a lot
Manuele
There is a difference. If you execute the query using DAL, web2py
loops over the output and converts the raw output into a database
independent formatting (for example if the database returns a date as
a string, web2py converts that into a datatime.date object) and store
them into a Storage object.
There is no overhead in generating the query from DAL but there is
overhead in normalizing the output.
This is necessary because every database engine will return records in
a different format but web2py needs to make the response database
independent.
If you run with profiler you will find that most of the time is spend
in the function parse.