Posted by miro_dietiker on January 23, 2011 at 1:57pm
1 follower
| Project: | Views Calc |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Currently when you enable paging and add e.g. SUM and COUNT, views_calc executes 4 additional queries.
Namely:
current-page-SUM
current-page-COUNT
total-SUM
total-COUNT
Regarding SQL we could limit to two queries:
current-page-SUM+COUNT
total-SUM+COUNT
If multiple aggregation functions enabled, we will waste less performance.
Comments
#1
Attached patch fundamentally changes the queries.
It only executes ONE query per subtotal and ONE query per page.
All aggregation functions are packed into one query - if any.
Already committed to dev since i consider it stable and clean.
Open for discussion to decide if we definitively stay on that.