summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-08-01 12:34:41 +0200
committerOlivier Dony <odo@openerp.com>2014-08-01 12:34:45 +0200
commite79a3675d13eacfd3d38e9725bbb354c778f0252 (patch)
treeb93732d7cca713ffdb2535d382490adfdae2a78d /addons/web/static/src/xml
parentf247bdd0b66d3d467de21ed1b966713c42c886aa (diff)
[FIX] orm.search_count: ignore `limit`, `offset` and most importantly `order`
These parameters are (or should be) irrelevant for a search_count(), and they could actually break the result or make it significantly slower (e.g applying `order` on large tables). This fixes a performance regression introduced by 0f43032b. We could also raise an error offset/limit are passed in combination with count, but that seems unnecessary. Also switched to "SELECT count(1)" for the count query, as it is simpler and just as fast. We'd get the same perf with * or any constant value, as in "SELECT count('me in')", but let's keep it simple ;-)
Diffstat (limited to 'addons/web/static/src/xml')
0 files changed, 0 insertions, 0 deletions