explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wnMV

Settings
# exclusive inclusive rows x rows loops node
1. 0.511 46.917 ↑ 1.4 712 1

Nested Loop Left Join (cost=1,764.22..11,046.47 rows=1,000 width=1,267) (actual time=31.684..46.917 rows=712 loops=1)

2. 0.103 42.846 ↑ 1.4 712 1

Nested Loop Left Join (cost=1,763.95..10,720.03 rows=1,000 width=1,219) (actual time=31.674..42.846 rows=712 loops=1)

3. 0.297 39.895 ↑ 1.4 712 1

Hash Left Join (cost=1,763.53..8,299.60 rows=1,000 width=1,202) (actual time=31.662..39.895 rows=712 loops=1)

  • Hash Cond: (ch.cv_customer_id = c.cv_customer_id)
4. 0.307 39.236 ↑ 1.4 712 1

Hash Left Join (cost=1,731.17..8,264.59 rows=1,000 width=1,154) (actual time=31.295..39.236 rows=712 loops=1)

  • Hash Cond: (e.source_id = ch.cv_channel_id)
5. 8.694 38.567 ↑ 1.4 712 1

Hash Right Join (cost=1,691.25..8,222.04 rows=1,000 width=1,138) (actual time=30.919..38.567 rows=712 loops=1)

  • Hash Cond: (st.event_id = e.ext_id)
6. 16.048 16.048 ↑ 1.0 24,653 1

Seq Scan on session_tracking st (cost=0.00..3,350.64 rows=24,864 width=897) (actual time=0.004..16.048 rows=24,653 loops=1)

7. 0.324 13.825 ↑ 1.4 712 1

Hash (cost=1,678.75..1,678.75 rows=1,000 width=257) (actual time=13.825..13.825 rows=712 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 172kB
8. 0.207 13.501 ↑ 1.4 712 1

Nested Loop (cost=113.50..1,678.75 rows=1,000 width=257) (actual time=0.602..13.501 rows=712 loops=1)

9. 0.012 0.394 ↑ 1.0 100 1

Limit (cost=74.97..75.22 rows=100 width=24) (actual time=0.368..0.394 rows=100 loops=1)

10. 0.176 0.382 ↑ 10.6 100 1

Sort (cost=74.97..77.63 rows=1,064 width=24) (actual time=0.367..0.382 rows=100 loops=1)

  • Sort Key: cv.when_last_event_recorded DESC
  • Sort Method: top-N heapsort Memory: 38kB
11. 0.206 0.206 ↑ 1.0 1,064 1

Seq Scan on cv (cost=0.00..34.30 rows=1,064 width=24) (actual time=0.007..0.206 rows=1,064 loops=1)

  • Filter: (rooftop_id = 'cd2f33e7-0836-4cd8-bbdb-8df5103a9350'::uuid)
12. 0.700 12.900 ↑ 1.4 7 100

Hash Right Join (cost=38.54..54.08 rows=10 width=257) (actual time=0.127..0.129 rows=7 loops=100)

  • Hash Cond: (u.id = e.source_id)
13. 0.300 0.300 ↑ 15.4 26 100

Seq Scan on ft_user u (cost=0.00..14.00 rows=400 width=80) (actual time=0.001..0.003 rows=26 loops=100)

14. 0.400 11.900 ↑ 1.4 7 100

Hash (cost=38.41..38.41 rows=10 width=193) (actual time=0.119..0.119 rows=7 loops=100)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
15. 0.200 11.500 ↑ 1.4 7 100

Subquery Scan on e (cost=38.19..38.41 rows=10 width=193) (actual time=0.112..0.115 rows=7 loops=100)

16. 0.100 11.300 ↑ 1.4 7 100

Limit (cost=38.19..38.31 rows=10 width=225) (actual time=0.112..0.113 rows=7 loops=100)

17. 9.300 11.200 ↑ 1.7 7 100

Sort (cost=38.19..38.22 rows=12 width=225) (actual time=0.112..0.112 rows=7 loops=100)

  • Sort Key: e_1.cursor_key DESC
  • Sort Method: quicksort Memory: 26kB
18. 0.800 1.900 ↓ 2.2 26 100

Nested Loop (cost=0.56..37.97 rows=12 width=225) (actual time=0.007..0.019 rows=26 loops=100)

19. 0.200 0.200 ↑ 1.0 1 100

Index Scan using cv_stream_cv_id_idx on cv_stream s (cost=0.28..8.29 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (cv_id = cv.cv_id)
20. 0.900 0.900 ↓ 2.0 26 100

Index Scan using cv_event_rooftop_id_cv_stream_id_idx on cv_event e_1 (cost=0.29..29.54 rows=13 width=193) (actual time=0.004..0.009 rows=26 loops=100)

  • Index Cond: ((rooftop_id = 'cd2f33e7-0836-4cd8-bbdb-8df5103a9350'::uuid) AND (cv_stream_id = s.cv_stream_id))
21. 0.188 0.362 ↓ 1.0 1,064 1

Hash (cost=26.63..26.63 rows=1,063 width=32) (actual time=0.362..0.362 rows=1,064 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 83kB
22. 0.174 0.174 ↓ 1.0 1,064 1

Seq Scan on cv_channel ch (cost=0.00..26.63 rows=1,063 width=32) (actual time=0.012..0.174 rows=1,064 loops=1)

23. 0.198 0.362 ↓ 1.1 1,064 1

Hash (cost=19.94..19.94 rows=994 width=80) (actual time=0.361..0.362 rows=1,064 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 66kB
24. 0.164 0.164 ↓ 1.1 1,064 1

Seq Scan on cv_customer c (cost=0.00..19.94 rows=994 width=80) (actual time=0.005..0.164 rows=1,064 loops=1)

25. 2.848 2.848 ↑ 1.0 1 712

Index Scan using vehicle_pkey on vehicle v (cost=0.41..2.42 rows=1 width=49) (actual time=0.004..0.004 rows=1 loops=712)

  • Index Cond: (vehicle_id = st.vehicle_id)
26. 3.560 3.560 ↓ 0.0 0 712

Index Scan using quote_pkey on quote q (cost=0.28..0.33 rows=1 width=67) (actual time=0.005..0.005 rows=0 loops=712)

  • Index Cond: (quote_id = st.quote_id)
Planning time : 1.889 ms
Execution time : 47.079 ms