explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3DcQ

Settings
# exclusive inclusive rows x rows loops node
1. 104.902 631.455 ↑ 5.8 620 1

GroupAggregate (cost=97,955.41..99,837.78 rows=3,568 width=110) (actual time=502.471..631.455 rows=620 loops=1)

  • Group Key: query.date, query."s.geo_country_code
2. 84.488 526.553 ↓ 2.6 92,899 1

Sort (cost=97,955.41..98,044.63 rows=35,685 width=106) (actual time=502.297..526.553 rows=92,899 loops=1)

  • Sort Key: query.date, query."s.geo_country_code
  • Sort Method: external merge Disk: 8568kB
3. 20.286 442.065 ↓ 2.6 92,899 1

Subquery Scan on query (cost=93,625.02..94,071.09 rows=35,685 width=106) (actual time=386.596..442.065 rows=92,899 loops=1)

4. 135.451 421.779 ↓ 2.6 92,899 1

Sort (cost=93,625.02..93,714.24 rows=35,685 width=114) (actual time=386.592..421.779 rows=92,899 loops=1)

  • Sort Key: s.id, p_1.id
  • Sort Method: external merge Disk: 8568kB
5. 64.214 286.328 ↓ 2.6 92,899 1

WindowAgg (cost=88,867.79..89,670.70 rows=35,685 width=114) (actual time=204.091..286.328 rows=92,899 loops=1)

6. 67.969 222.114 ↓ 2.6 92,899 1

Sort (cost=88,867.79..88,957.00 rows=35,685 width=98) (actual time=204.073..222.114 rows=92,899 loops=1)

  • Sort Key: p_1.id
  • Sort Method: external merge Disk: 7104kB
7. 28.207 154.145 ↓ 2.6 92,899 1

Hash Join (cost=75,805.39..85,053.46 rows=35,685 width=98) (actual time=85.771..154.145 rows=92,899 loops=1)

  • Hash Cond: (p_1.session_id = s.id)
8. 11.210 124.717 ↓ 12.3 92,899 1

Gather (cost=75,051.48..83,034.55 rows=7,568 width=88) (actual time=84.544..124.717 rows=92,899 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
9. 23.707 113.507 ↓ 29.5 92,899 1

Parallel Hash Join (cost=74,051.48..81,277.75 rows=3,153 width=88) (actual time=84.091..113.507 rows=92,899 loops=1)

  • Hash Cond: (p_1.id = e_1.page_view_id)
10. 0.892 6.631 ↓ 2.4 9,290 1

Parallel Append (cost=0.00..7,198.44 rows=3,919 width=36) (actual time=0.024..6.631 rows=9,290 loops=1)

11. 5.738 5.738 ↓ 1.7 9,290 1

Parallel Index Scan using _hyper_3_3_chunk_idx_pageview_property_id_and_created_at on _hyper_3_3_chunk p_1 (cost=0.42..7,178.84 rows=5,532 width=36) (actual time=0.023..5.738 rows=9,290 loops=1)

  • Index Cond: ((property_id = 2) AND (created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone))
12. 0.001 0.001 ↓ 0.0 0 1

Parallel Seq Scan on stats_page_view p (cost=0.00..0.00 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone) AND (property_id = 2))
13. 23.959 83.169 ↓ 2.2 92,899 1

Parallel Hash (cost=73,528.20..73,528.20 rows=41,862 width=68) (actual time=83.169..83.169 rows=92,899 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 7584kB
14. 10.081 59.210 ↓ 2.2 92,899 1

Parallel Append (cost=0.00..73,528.20 rows=41,862 width=68) (actual time=0.020..59.210 rows=92,899 loops=1)

15. 49.128 49.128 ↓ 2.2 92,899 1

Parallel Index Scan using _hyper_5_4_chunk_idx_event_property_id_and_created_at on _hyper_5_4_chunk e_1 (cost=0.43..73,318.89 rows=41,861 width=68) (actual time=0.019..49.128 rows=92,899 loops=1)

  • Index Cond: ((property_id = 2) AND (created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone))
16. 0.001 0.001 ↓ 0.0 0 1

Parallel Seq Scan on stats_event e (cost=0.00..0.00 rows=1 width=68) (actual time=0.000..0.001 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone) AND (property_id = 2))
17. 0.197 1.221 ↑ 1.0 929 1

Hash (cost=742.13..742.13 rows=943 width=26) (actual time=1.221..1.221 rows=929 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 61kB
18. 0.091 1.024 ↑ 1.0 929 1

Append (cost=0.00..742.13 rows=943 width=26) (actual time=0.020..1.024 rows=929 loops=1)

19. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on stats_session s (cost=0.00..0.00 rows=1 width=62) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone) AND (property_id = 2))
20. 0.929 0.929 ↑ 1.0 929 1

Index Scan using _hyper_2_2_chunk_idx_session_property_id_and_created_at on _hyper_2_2_chunk s_1 (cost=0.29..737.41 rows=942 width=26) (actual time=0.015..0.929 rows=929 loops=1)

  • Index Cond: ((property_id = 2) AND (created_at >= '2019-04-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 23:59:59+00'::timestamp with time zone))