diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-09-09 10:37:00 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-01 07:51:11 +0200 |
| commit | 415f7e954b021cad720c27ea73cadb3fb400e570 (patch) | |
| tree | 99dd84cc27bcdf8fffb7adaf8d26ccda4ff337fb /content/posts/nested-postgres-results/json-array-agg.txt | |
| parent | 7485cdcfa7d5ffe9bb928dffefd070b13f4de518 (diff) | |
Add comparison of sql pipelines
Diffstat (limited to 'content/posts/nested-postgres-results/json-array-agg.txt')
| -rw-r--r-- | content/posts/nested-postgres-results/json-array-agg.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/content/posts/nested-postgres-results/json-array-agg.txt b/content/posts/nested-postgres-results/json-array-agg.txt new file mode 100644 index 0000000..63bebe7 --- /dev/null +++ b/content/posts/nested-postgres-results/json-array-agg.txt @@ -0,0 +1,33 @@ +GroupAggregate (cost=14206.02..16973.61 rows=8849 width=36) (actual time=15.958..31.415 rows=10000 loops=1) + Output: accommodation_id, json_agg(json_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=15.939..17.800 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.210..14.424 rows=6667 loops=3) + Output: accommodation_id, date, price + Sort Key: overrides.accommodation_id + Sort Method: quicksort Memory: 423kB + Buffers: shared hit=6442 + Worker 0: actual time=13.430..13.637 rows=6367 loops=1 + Sort Method: quicksort Memory: 391kB + Buffers: shared hit=2064 + Worker 1: actual time=13.558..13.776 rows=6247 loops=1 + Sort Method: quicksort Memory: 388kB + Buffers: shared hit=2031 + -> Parallel Seq Scan on public.overrides (cost=0.00..12619.99 rows=8930 width=13) (actual time=0.013..13.396 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.008..12.658 rows=6367 loops=1 + Buffers: shared hit=2028 + Worker 1: actual time=0.018..12.728 rows=6247 loops=1 + Buffers: shared hit=1995 +Planning: + Buffers: shared hit=129 +Planning Time: 0.292 ms +Execution Time: 31.781 ms |
