So, basically you're doing
get me 150K rows, put them in a list
for each of them, query the db for permission
if query doesn't return True, scan the 150K list and remove this instance
Cycling 150K and removing from a list while checking surely will get your
app killed.
Firing one query for
Not exactly. The fields in rows are indices into db.my_table. len(rows) is
a small variable number, say around 8.
But there it is, anyway. Thank you Mr. Niphlod. Good work!
bad_rows = db((db.my_table.id.belongs(rows))
(auth.accessible_query('update', db.my_table,
2 matches
Mail list logo