explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jOJi

Settings
# exclusive inclusive rows x rows loops node
1. 42.510 111.403 ↑ 27.2 39,600 1

Merge Join (cost=47,877.78..116,911.06 rows=1,076,253 width=137) (actual time=54.488..111.403 rows=39,600 loops=1)

  • Merge Cond: (stats_page_view.id = stats_event.page_view_id)
  • Join Filter: (((stats_session.campaign_id)::numeric >= '1'::numeric) OR (((stats_event."values" ->> 'scrollTriggerValue'::text))::numeric <= '100'::numeric))
2. 2.225 7.185 ↑ 2.3 3,960 1

Sort (cost=5,149.94..5,172.28 rows=8,933 width=81) (actual time=6.528..7.185 rows=3,960 loops=1)

  • Sort Key: stats_page_view.id
  • Sort Method: quicksort Memory: 653kB
3. 1.457 4.960 ↑ 2.3 3,960 1

Hash Join (cost=379.75..4,563.72 rows=8,933 width=81) (actual time=0.590..4.960 rows=3,960 loops=1)

  • Hash Cond: (stats_page_view.session_id = stats_session.id)
4. 0.385 2.941 ↑ 1.1 3,995 1

Append (cost=0.00..3,862.12 rows=4,326 width=44) (actual time=0.016..2.941 rows=3,995 loops=1)

5. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on stats_page_view (cost=0.00..0.00 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone) AND (property_id = 1))
6. 2.552 2.552 ↑ 1.1 3,995 1

Index Scan using _hyper_3_3_chunk_idx_pageview_property_id_and_created_at on _hyper_3_3_chunk (cost=0.42..3,840.49 rows=4,325 width=44) (actual time=0.012..2.552 rows=3,995 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone))
7. 0.090 0.562 ↑ 1.0 396 1

Hash (cost=374.59..374.59 rows=413 width=53) (actual time=0.561..0.562 rows=396 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
8. 0.039 0.472 ↑ 1.0 396 1

Append (cost=0.00..374.59 rows=413 width=53) (actual time=0.019..0.472 rows=396 loops=1)

9. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on stats_session (cost=0.00..0.00 rows=1 width=262) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone) AND (property_id = 1))
10. 0.432 0.432 ↑ 1.0 396 1

Index Scan using _hyper_2_2_chunk_idx_session_property_id_and_created_at on _hyper_2_2_chunk (cost=0.29..372.52 rows=412 width=52) (actual time=0.018..0.432 rows=396 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone))
11. 5.256 61.708 ↑ 1.1 40,012 1

Materialize (cost=42,727.84..42,944.70 rows=43,373 width=76) (actual time=47.945..61.708 rows=40,012 loops=1)

12. 31.155 56.452 ↑ 1.1 40,012 1

Sort (cost=42,727.84..42,836.27 rows=43,373 width=76) (actual time=47.942..56.452 rows=40,012 loops=1)

  • Sort Key: stats_event.page_view_id
  • Sort Method: external merge Disk: 2272kB
13. 3.904 25.297 ↑ 1.1 40,012 1

Append (cost=0.00..38,285.14 rows=43,373 width=76) (actual time=2.505..25.297 rows=40,012 loops=1)

14. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on stats_event (cost=0.00..0.00 rows=1 width=76) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone) AND (property_id = 1))
15. 21.386 21.386 ↑ 1.1 40,012 1

Index Scan using _hyper_5_4_chunk_idx_event_property_id_and_created_at on _hyper_5_4_chunk (cost=0.43..38,068.27 rows=43,372 width=76) (actual time=2.496..21.386 rows=40,012 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-05 09:37:00+00'::timestamp with time zone) AND (created_at <= '2019-04-10 09:37:59+00'::timestamp with time zone))