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

miro_dietiker’s picture

Status: Active » Needs review
StatusFileSize
new9.15 KB

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.

karens’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

The D6 version is no longer supported.

sinasalek’s picture

Why this issue is closed? does that mean it no longer applies to Drupal 7 version?