mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
This specific query is quite expensive, and what's worse, it's also done twice: once to count records and once to get them. By using a window function, we can get the count and results in one query, thus almost doubling performance in this operation. Related resources: - [Explanation](https://stackoverflow.com/a/22353886/1468388). - [Explain of the 1st SELECT COUNT(*), before the patch](https://explain.dalibo.com/plan/TgL). - [Explain of the 2nd SELECT, before the patch](https://explain.dalibo.com/plan/Yc9). - [Explain of the new, unified SELECT, after the patch](https://explain.dalibo.com/plan/9MA). @Tecnativa TT28595 TT29916 https://github.com/odoo/odoo/pull/73765