explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a8l0

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.027 ↓ 0.0 0 1

Nested Loop (cost=2,191,947.35..6,676,892.16 rows=9,954,832 width=190) (actual time=0.027..0.027 rows=0 loops=1)

2. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2,191,947.07..6,177,763.07 rows=268,268 width=125) (actual time=0.026..0.026 rows=0 loops=1)

3. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2,191,946.78..6,165,650.51 rows=7,229 width=116) (actual time=0.026..0.026 rows=0 loops=1)

4. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2,191,946.50..6,163,481.46 rows=7,229 width=78) (actual time=0.026..0.026 rows=0 loops=1)

  • Join Filter: (r.sm_reservation_id = ss_1.sm_reservation_id)
5. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=3.13..19.94 rows=1 width=78) (actual time=0.026..0.026 rows=0 loops=1)

6. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2.85..19.64 rows=1 width=40) (actual time=0.026..0.026 rows=0 loops=1)

7. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2.42..18.91 rows=1 width=32) (actual time=0.026..0.026 rows=0 loops=1)

  • Join Filter: (ss.sm_resource_id = s.sm_resource_id)
8. 0.000 0.026 ↓ 0.0 0 1

Nested Loop (cost=2.14..18.59 rows=1 width=48) (actual time=0.026..0.026 rows=0 loops=1)

  • Join Filter: ((ss.sm_reservation_id = r_1.sm_reservation_id) AND (ss.schedule_priority = COALESCE(r_1.date_scheduled_provisional_ind, '1'::numeric)))
9. 0.001 0.026 ↓ 0.0 0 1

Nested Loop (cost=1.72..17.86 rows=1 width=69) (actual time=0.026..0.026 rows=0 loops=1)

10. 0.000 0.025 ↓ 0.0 0 1

Nested Loop (cost=1.29..17.38 rows=1 width=69) (actual time=0.025..0.025 rows=0 loops=1)

11. 0.000 0.025 ↓ 0.0 0 1

Nested Loop (cost=0.86..16.91 rows=1 width=45) (actual time=0.025..0.025 rows=0 loops=1)

12. 0.025 0.025 ↓ 0.0 0 1

Index Scan using end_time_index on sm_schedule ss (cost=0.43..8.46 rows=1 width=45) (actual time=0.025..0.025 rows=0 loops=1)

  • Index Cond: ((end_time >= to_timestamp('2020-10-09 16:35:00'::text, 'yyyy-MM-dd HH24:mi:ss'::text)) AND (end_time < to_timestamp('2020-10-09 16:36:00'::text, 'yyyy-MM-dd HH24:mi:ss'::text)))
  • Filter: ((sm_resource_type_cd = 'STUDIO'::bpchar) AND (sm_reservation_type_cd = 'REQUEST'::bpchar))
13. 0.000 0.000 ↓ 0.0 0

Index Scan using rss_comp_01_index on request_studio_schedule rss (cost=0.43..8.45 rows=1 width=16) (never executed)

  • Index Cond: (sm_schedule_id = ss.sm_schedule_id)
14. 0.000 0.000 ↓ 0.0 0

Index Scan using request_virtual_studio_pk on request_virtual_studio rvs (cost=0.43..0.48 rows=1 width=24) (never executed)

  • Index Cond: (request_virtual_studio_id = rss.request_virtual_studio_id)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using request_virtual_studio_pk on request_virtual_studio rvs_1 (cost=0.43..0.48 rows=1 width=24) (never executed)

  • Index Cond: (request_virtual_studio_id = rss.request_virtual_studio_id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using request_pk on request r_1 (cost=0.42..0.72 rows=1 width=21) (never executed)

  • Index Cond: (request_id = rvs_1.request_id)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using studio_pk on studio s (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Index Cond: (studio_id = rvs_1.studio_id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using request_pk on request r (cost=0.42..0.73 rows=1 width=16) (never executed)

  • Index Cond: (request_id = rvs.request_id)
  • Filter: ((start_call_automatically = '1'::numeric) AND (gateway_needed = '0'::numeric) AND (bridge_needed = '0'::numeric) AND (status_cd = 'SCHEDULED'::bpchar))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using studio_pk on studio s2 (cost=0.28..0.30 rows=1 width=38) (never executed)

  • Index Cond: (studio_id = rvs.studio_id)
20. 0.000 0.000 ↓ 0.0 0

Finalize GroupAggregate (cost=2,191,943.37..5,539,752.90 rows=27,720,383 width=264) (never executed)

  • Group Key: ss_1.sm_reservation_id, ss_1.sm_resource_id, s_1.studio_id
21. 0.000 0.000 ↓ 0.0 0

Gather Merge (cost=2,191,943.37..5,089,296.67 rows=23,100,320 width=24) (never executed)

  • Workers Planned: 2
  • Workers Launched: 0
22. 0.000 0.000 ↓ 0.0 0

Partial GroupAggregate (cost=2,190,943.34..2,421,946.54 rows=11,550,160 width=24) (never executed)

  • Group Key: ss_1.sm_reservation_id, ss_1.sm_resource_id, s_1.studio_id
23. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,190,943.34..2,219,818.74 rows=11,550,160 width=24) (never executed)

  • Sort Key: ss_1.sm_reservation_id, ss_1.sm_resource_id, s_1.studio_id
24. 0.000 0.000 ↓ 0.0 0

Merge Join (cost=187,536.42..362,289.17 rows=11,550,160 width=24) (never executed)

  • Merge Cond: (ss_1.sm_resource_id = s_1.sm_resource_id)
25. 0.000 0.000 ↓ 0.0 0

Sort (cost=186,632.53..187,382.73 rows=300,082 width=16) (never executed)

  • Sort Key: ss_1.sm_resource_id
26. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=45,736.45..154,201.57 rows=300,082 width=16) (never executed)

  • Hash Cond: (ss_1.sm_schedule_id = rss_1.sm_schedule_id)
27. 0.000 0.000 ↓ 0.0 0

Parallel Seq Scan on sm_schedule ss_1 (cost=0.00..83,883.75 rows=1,517,475 width=24) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Hash (cost=33,919.99..33,919.99 rows=720,197 width=8) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Seq Scan on request_studio_schedule rss_1 (cost=0.00..33,919.99 rows=720,197 width=8) (never executed)

  • Filter: (is_host_studio = '1'::numeric)
30. 0.000 0.000 ↓ 0.0 0

Sort (cost=903.90..923.14 rows=7,698 width=16) (never executed)

  • Sort Key: s_1.sm_resource_id
31. 0.000 0.000 ↓ 0.0 0

Seq Scan on studio s_1 (cost=0.00..406.98 rows=7,698 width=16) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using studio_pk on studio s1 (cost=0.28..0.30 rows=1 width=38) (never executed)

  • Index Cond: (studio_id = s_1.studio_id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using studio_conn_alias_st_id on studio_connection_alias sca2 (cost=0.29..1.31 rows=37 width=25) (never executed)

  • Index Cond: (studio_id = rvs.studio_id)
  • Filter: (default_alias = '1'::numeric)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using studio_conn_alias_st_id on studio_connection_alias sca1 (cost=0.29..1.31 rows=37 width=25) (never executed)

  • Index Cond: (studio_id = s_1.studio_id)
  • Filter: (default_alias = '1'::numeric)
Planning time : 8.796 ms
Execution time : 0.267 ms