From 415f7e954b021cad720c27ea73cadb3fb400e570 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 9 Sep 2025 10:37:00 +0200 Subject: Add comparison of sql pipelines --- .../nested-postgres-results/jsonb-array-agg.txt | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'content/posts/nested-postgres-results/jsonb-array-agg.txt') diff --git a/content/posts/nested-postgres-results/jsonb-array-agg.txt b/content/posts/nested-postgres-results/jsonb-array-agg.txt index 35ae6bb..5936490 100644 --- a/content/posts/nested-postgres-results/jsonb-array-agg.txt +++ b/content/posts/nested-postgres-results/jsonb-array-agg.txt @@ -1,33 +1,33 @@ - GroupAggregate (cost=14173.77..16807.65 rows=8725 width=36) (actual time=15.671..34.981 rows=10000 loops=1) - Output: accommodation_id, jsonb_agg(jsonb_build_object('date', date, 'price', price)) - Group Key: overrides.accommodation_id - Buffers: shared hit=6442 - -> Gather Merge (cost=14173.77..16545.84 rows=20367 width=13) (actual time=15.641..17.253 rows=20000 loops=1) - Output: accommodation_id, date, price - Workers Planned: 2 - Workers Launched: 2 - Buffers: shared hit=6442 - -> Sort (cost=13173.74..13194.96 rows=8486 width=13) (actual time=13.876..14.122 rows=6667 loops=3) - Output: accommodation_id, date, price - Sort Key: overrides.accommodation_id - Sort Method: quicksort Memory: 430kB - Buffers: shared hit=6442 - Worker 0: actual time=13.239..13.513 rows=6391 loops=1 - Sort Method: quicksort Memory: 392kB - Buffers: shared hit=2067 - Worker 1: actual time=13.028..13.281 rows=5997 loops=1 - Sort Method: quicksort Memory: 380kB - Buffers: shared hit=1948 - -> Parallel Seq Scan on public.overrides (cost=0.00..12619.99 rows=8486 width=13) (actual time=0.009..13.186 rows=6667 loops=3) - Output: accommodation_id, date, price - Filter: ((overrides.date >= '2025-07-01'::date) AND (overrides.date < '2025-07-08'::date)) - Rows Removed by Filter: 326666 - Buffers: shared hit=6370 - Worker 0: actual time=0.010..12.581 rows=6391 loops=1 - Buffers: shared hit=2031 - Worker 1: actual time=0.008..12.365 rows=5997 loops=1 - Buffers: shared hit=1912 - Planning: - Buffers: shared hit=129 - Planning Time: 0.251 ms - Execution Time: 35.310 ms +GroupAggregate (cost=14206.02..16973.61 rows=8849 width=36) (actual time=16.239..41.215 rows=10000 loops=1) + Output: accommodation_id, jsonb_agg(jsonb_build_object('date', date, 'price', price)) + Group Key: overrides.accommodation_id + Buffers: shared hit=6442 + -> Gather Merge (cost=14206.02..16702.25 rows=21433 width=13) (actual time=16.215..18.136 rows=20000 loops=1) + Output: accommodation_id, date, price + Workers Planned: 2 + Workers Launched: 2 + Buffers: shared hit=6442 + -> Sort (cost=13206.00..13228.33 rows=8930 width=13) (actual time=14.416..14.629 rows=6667 loops=3) + Output: accommodation_id, date, price + Sort Key: overrides.accommodation_id + Sort Method: quicksort Memory: 424kB + Buffers: shared hit=6442 + Worker 0: actual time=13.574..13.780 rows=6267 loops=1 + Sort Method: quicksort Memory: 388kB + Buffers: shared hit=2037 + Worker 1: actual time=13.768..13.981 rows=6339 loops=1 + Sort Method: quicksort Memory: 391kB + Buffers: shared hit=2050 + -> Parallel Seq Scan on public.overrides (cost=0.00..12619.99 rows=8930 width=13) (actual time=0.024..13.580 rows=6667 loops=3) + Output: accommodation_id, date, price + Filter: ((overrides.date >= '2025-07-01'::date) AND (overrides.date < '2025-07-08'::date)) + Rows Removed by Filter: 326666 + Buffers: shared hit=6370 + Worker 0: actual time=0.011..12.728 rows=6267 loops=1 + Buffers: shared hit=2001 + Worker 1: actual time=0.051..12.968 rows=6339 loops=1 + Buffers: shared hit=2014 +Planning: + Buffers: shared hit=129 +Planning Time: 0.274 ms +Execution Time: 41.571 ms -- cgit v1.3