explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x1nX

Settings
# exclusive inclusive rows x rows loops node
1. 116.814 567.486 ↑ 5.8 620 1

GroupAggregate (cost=94,401.55..96,283.92 rows=3,568 width=110) (actual time=443.916..567.486 rows=620 loops=1)

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

Sort (cost=94,401.55..94,490.77 rows=35,685 width=106) (actual time=443.767..450.672 rows=92,899 loops=1)

  • Sort Key: query.date, query."s.geo_country_code
  • Sort Method: quicksort Memory: 16136kB
3. 21.048 399.096 ↓ 2.6 92,899 1

Subquery Scan on query (cost=91,257.16..91,703.23 rows=35,685 width=106) (actual time=367.984..399.096 rows=92,899 loops=1)

4. 107.980 378.048 ↓ 2.6 92,899 1

Sort (cost=91,257.16..91,346.38 rows=35,685 width=114) (actual time=367.981..378.048 rows=92,899 loops=1)

  • Sort Key: s.id, p.id
  • Sort Method: quicksort Memory: 16136kB
5. 66.451 270.068 ↓ 2.6 92,899 1

WindowAgg (cost=87,755.93..88,558.84 rows=35,685 width=114) (actual time=192.682..270.068 rows=92,899 loops=1)

6. 59.846 203.617 ↓ 2.6 92,899 1

Sort (cost=87,755.93..87,845.14 rows=35,685 width=98) (actual time=192.658..203.617 rows=92,899 loops=1)

  • Sort Key: p.id
  • Sort Method: quicksort Memory: 16136kB
7. 28.237 143.771 ↓ 2.6 92,899 1

Hash Join (cost=76,417.06..85,057.60 rows=35,685 width=98) (actual time=83.791..143.771 rows=92,899 loops=1)

  • Hash Cond: (p.session_id = s.id)
8. 23.885 114.307 ↓ 12.3 92,899 1

Hash Join (cost=75,663.14..83,038.70 rows=7,568 width=88) (actual time=82.558..114.307 rows=92,899 loops=1)

  • Hash Cond: (p.id = e.page_view_id)
9. 0.936 8.473 ↑ 1.0 9,290 1

Append (cost=0.00..7,264.60 rows=9,406 width=36) (actual time=0.025..8.473 rows=9,290 loops=1)

10. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on stats_page_view p (cost=0.00..0.00 rows=1 width=36) (actual time=0.005..0.005 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))
11. 7.532 7.532 ↑ 1.0 9,290 1

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,217.57 rows=9,405 width=36) (actual time=0.020..7.532 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. 23.252 81.949 ↑ 1.1 92,899 1

Hash (cost=74,407.29..74,407.29 rows=100,468 width=68) (actual time=81.949..81.949 rows=92,899 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 7194kB
13. 9.574 58.697 ↑ 1.1 92,899 1

Append (cost=0.00..74,407.29 rows=100,468 width=68) (actual time=0.017..58.697 rows=92,899 loops=1)

14. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on stats_event e (cost=0.00..0.00 rows=1 width=68) (actual time=0.003..0.003 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))
15. 49.120 49.120 ↑ 1.1 92,899 1

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,904.95 rows=100,467 width=68) (actual time=0.014..49.120 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.191 1.227 ↑ 1.0 929 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 61kB
17. 0.090 1.036 ↑ 1.0 929 1

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

18. 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))
19. 0.942 0.942 ↑ 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.942 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))
Planning time : 0.894 ms
Execution time : 569.935 ms