explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4DY4

Settings
# exclusive inclusive rows x rows loops node
1. 20.084 226.467 ↑ 1.4 8,900 1

Hash Join (cost=76,235.86..85,201.61 rows=12,034 width=660) (actual time=137.326..226.467 rows=8,900 loops=1)

  • Hash Cond: (_hyper_3_3_chunk.session_id = stats_session.id)
2. 14.762 197.490 ↓ 13.2 97,000 1

Gather (cost=69,542.33..77,916.81 rows=7,323 width=628) (actual time=111.452..197.490 rows=97,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 33.635 182.728 ↓ 31.8 97,000 1

Hash Left Join (cost=68,542.33..76,184.51 rows=3,051 width=628) (actual time=110.687..182.728 rows=97,000 loops=1)

  • Hash Cond: (_hyper_5_4_chunk.event_id = event.id)
4. 30.654 149.076 ↓ 31.8 97,000 1

Parallel Hash Join (cost=68,531.65..76,165.82 rows=3,051 width=104) (actual time=110.658..149.076 rows=97,000 loops=1)

  • Hash Cond: (_hyper_3_3_chunk.id = _hyper_5_4_chunk.page_view_id)
5. 1.012 8.748 ↓ 2.3 9,700 1

Parallel Append (cost=0.28..7,605.89 rows=4,221 width=44) (actual time=0.031..8.748 rows=9,700 loops=1)

6. 7.729 7.729 ↓ 1.6 9,700 1

Parallel Index Scan using _hyper_3_3_chunk_idx_pageview_property_id_and_created_at on _hyper_3_3_chunk (cost=0.42..7,583.05 rows=5,956 width=44) (actual time=0.022..7.729 rows=9,700 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
7. 0.006 0.006 ↓ 0.0 0 1

Parallel Index Scan using _hyper_3_7_chunk_idx_pageview_property_id_and_created_at on _hyper_3_7_chunk (cost=0.28..1.74 rows=1 width=44) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
8. 0.001 0.001 ↓ 0.0 0 1

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

  • Filter: ((created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone) AND (property_id = 1))
9. 31.020 109.674 ↓ 2.6 97,000 1

Parallel Hash (cost=68,061.09..68,061.09 rows=37,623 width=76) (actual time=109.674..109.674 rows=97,000 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 8640kB
10. 10.770 78.654 ↓ 2.6 97,000 1

Parallel Append (cost=0.28..68,061.09 rows=37,623 width=76) (actual time=0.024..78.654 rows=97,000 loops=1)

11. 67.876 67.876 ↓ 2.6 97,000 1

Parallel Index Scan using _hyper_5_4_chunk_idx_event_property_id_and_created_at on _hyper_5_4_chunk (cost=0.43..67,871.23 rows=37,621 width=76) (actual time=0.015..67.876 rows=97,000 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
12. 0.007 0.007 ↓ 0.0 0 1

Parallel Index Scan using _hyper_5_8_chunk_idx_event_property_id_and_created_at on _hyper_5_8_chunk (cost=0.28..1.74 rows=1 width=76) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
13. 0.001 0.001 ↓ 0.0 0 1

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

  • Filter: ((created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone) AND (property_id = 1))
14. 0.002 0.017 ↑ 10.0 3 1

Hash (cost=10.30..10.30 rows=30 width=528) (actual time=0.017..0.017 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.015 0.015 ↑ 10.0 3 1

Seq Scan on event (cost=0.00..10.30 rows=30 width=528) (actual time=0.013..0.015 rows=3 loops=1)

16. 0.029 8.893 ↑ 3.7 89 1

Hash (cost=6,689.41..6,689.41 rows=329 width=48) (actual time=8.893..8.893 rows=89 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
17. 0.134 8.864 ↑ 3.7 89 1

Hash Join (cost=5,920.90..6,689.41 rows=329 width=48) (actual time=7.794..8.864 rows=89 loops=1)

  • Hash Cond: (stats_session.user_id = max_scr.user_id)
18. 0.092 1.179 ↑ 1.0 970 1

Append (cost=0.00..765.88 rows=981 width=48) (actual time=0.032..1.179 rows=970 loops=1)

19. 0.005 0.005 ↓ 0.0 0 1

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

  • Filter: ((created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone) AND (property_id = 1))
20. 0.006 0.006 ↓ 0.0 0 1

Index Scan using _hyper_2_6_chunk_idx_session_property_id_and_created_at on _hyper_2_6_chunk (cost=0.27..1.73 rows=1 width=48) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
21. 1.076 1.076 ↑ 1.0 970 1

Index Scan using _hyper_2_2_chunk_idx_session_property_id_and_created_at on _hyper_2_2_chunk (cost=0.29..759.24 rows=979 width=48) (actual time=0.021..1.076 rows=970 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-03-14 09:45:00+00'::timestamp with time zone) AND (created_at <= '2019-05-13 09:45:59+00'::timestamp with time zone))
22. 0.018 7.551 ↓ 1.3 85 1

Hash (cost=5,920.07..5,920.07 rows=67 width=16) (actual time=7.550..7.551 rows=85 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
23. 0.011 7.533 ↓ 1.3 85 1

Subquery Scan on max_scr (cost=5,916.40..5,920.07 rows=67 width=16) (actual time=7.235..7.533 rows=85 loops=1)

24. 2.415 7.522 ↓ 1.3 85 1

HashAggregate (cost=5,916.40..5,919.40 rows=67 width=48) (actual time=7.235..7.522 rows=85 loops=1)

  • Group Key: stats_page_view_1.user_id
  • Filter: (avg(stats_page_view_1.max_scroll) >= '60'::numeric)
  • Rows Removed by Filter: 572
25. 0.668 5.107 ↑ 1.1 6,667 1

Append (cost=0.00..5,880.48 rows=7,183 width=20) (actual time=0.024..5.107 rows=6,667 loops=1)

26. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on stats_page_view stats_page_view_1 (cost=0.00..0.00 rows=1 width=20) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone) AND (property_id = 1))
27. 0.004 0.004 ↓ 0.0 0 1

Index Scan using _hyper_3_14_chunk_idx_pageview_property_id_and_created_at on _hyper_3_14_chunk (cost=0.29..1.74 rows=1 width=20) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone))
28. 0.004 0.004 ↓ 0.0 0 1

Index Scan using _hyper_3_10_chunk_idx_pageview_property_id_and_created_at on _hyper_3_10_chunk (cost=0.29..1.74 rows=1 width=20) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone))
29. 0.004 0.004 ↓ 0.0 0 1

Index Scan using _hyper_3_18_chunk_idx_pageview_property_id_and_created_at on _hyper_3_18_chunk (cost=0.28..1.74 rows=1 width=20) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone))
30. 4.419 4.419 ↑ 1.1 6,667 1

Index Scan using _hyper_3_3_chunk_idx_pageview_property_id_and_created_at on _hyper_3_3_chunk _hyper_3_3_chunk_1 (cost=0.42..5,837.60 rows=7,178 width=20) (actual time=0.011..4.419 rows=6,667 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone))
31. 0.007 0.007 ↓ 0.0 0 1

Index Scan using _hyper_3_7_chunk_idx_pageview_property_id_and_created_at on _hyper_3_7_chunk _hyper_3_7_chunk_1 (cost=0.28..1.74 rows=1 width=20) (actual time=0.006..0.007 rows=0 loops=1)

  • Index Cond: ((property_id = 1) AND (created_at >= '2019-04-04 00:00:00+00'::timestamp with time zone))
Planning time : 1.992 ms
Execution time : 228.573 ms