The toolbar wasn't helpful, as this is a json script, and I didn't want to
screw with user experiance. Also, the db._timings, I think, is not relevant
to GAE. I used it and showd 0 queries. But,
I've used appstats, and found there's no extra query, so I guess I'll have
to search for the big
for entity in db(db.table2.id 0).select():
retVal += entity.table1.name
No, web2py does not retrieve entity.table1.name when the first line above
is executed. Rather, it does a separate select when the second line is
executed. entity.table1 is a DAL Reference object -- when you access
I would replace
retVal = []
for entity in db(db.table2.id 0).select():
retVal += entity.table1.name
with
table1_map = db(db.table2 http://db.table2.id/).select().as_dict()
retVal = [table1_map[entity.table1].name http://entity.table1.name/ for
entity in db(db.table2
Hum, I forgot the problem has two tables. Nice!
2013/6/4 Massimo Di Pierro massimo.dipie...@gmail.com
I would replace
retVal = []
for entity in db(db.table2.id 0).select():
retVal += entity.table1.name
with
table1_map = db(db.table2 http://db.table2.id/).select().as_dict()
retVal
OK, so I could be wrong about this.
Is there a way to get the number of GAE datastore reads per request?
On Tuesday, June 4, 2013 12:25:06 PM UTC+3, guruyaya wrote:
Lets examine this code for a sec:
db.define_table('table1',Field('name'))
db.define_table('table2',Field('table1', db.table1),
{{=response.toolbar()}} includes a button for all the queries and their
execution times (this is also available as a list of 2-tuples in
db._timings).
Anthony
On Tuesday, June 4, 2013 10:05:49 AM UTC-4, guruyaya wrote:
OK, so I could be wrong about this.
Is there a way to get the number of
6 matches
Mail list logo