From 722c30f3f4bf356403c49e77385aaf16e7407e49 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 29 Mar 2026 16:34:08 +0200 Subject: Improved sections --- content/posts/postgres-aggregates-correction/index.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/content/posts/postgres-aggregates-correction/index.md b/content/posts/postgres-aggregates-correction/index.md index 180229f..d94fcac 100644 --- a/content/posts/postgres-aggregates-correction/index.md +++ b/content/posts/postgres-aggregates-correction/index.md @@ -111,15 +111,7 @@ FROM products; | Subquery `count(*)` | Index Only Scan | 100ms | | Merged CTEs | Parallel Seq Scan | 100ms | -## Going further - -I have mixed feelings about this updated version. When I discovered -this, I thought the whole point of my article collapsed. But now -that I did the work to show it, I'm not so sure. Here are some -updated limitations to the use of subqueries. - - -### Leaf filtering +## Leaf filtering The Subquery approach is better for root table filtering. If you want to compute the same statistics, but only for products with @@ -222,7 +214,7 @@ LEFT JOIN product_orders ON products.id = product_orders.product_id; | Subquery `count(*)` | 100ms | 110ms | | Merged CTEs | 100ms | 140ms | -### Disk usage +## Disk usage Another important aspect is disk usage. Here's a summary of disk read for each query. -- cgit v1.3