explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vk19

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=15,436,138.61..15,436,153.88 rows=142 width=26) (actual rows= loops=)

  • Group Key: s.name
2. 0.000 0.000 ↓ 0.0

Sort (cost=15,436,138.61..15,436,138.97 rows=142 width=26) (actual rows= loops=)

  • Sort Key: s.name
3. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=819,951.06..15,436,133.54 rows=142 width=26) (actual rows= loops=)

  • Join Filter: (w.id = wsmt.entity_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=819,950.36..4,383,942.70 rows=79,129 width=42) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=819,949.79..1,742,155.74 rows=1,138,781 width=34) (actual rows= loops=)

  • Hash Cond: (ws.worker_id = w.id)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=83.49..919,300.04 rows=1,138,781 width=26) (actual rows= loops=)

  • Hash Cond: (ws.subset_id = s.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on worker_subset ws (cost=0.00..896,749.00 rows=8,326,960 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=64.11..64.11 rows=189 width=26) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on subset s (cost=5.74..64.11 rows=189 width=26) (actual rows= loops=)

  • Recheck Cond: (partition_id = 1)
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_subset_partition (cost=0.00..5.70 rows=189 width=0) (actual rows= loops=)

  • Index Cond: (partition_id = 1)
11. 0.000 0.000 ↓ 0.0

Hash (cost=604,413.66..604,413.66 rows=2,101,977 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_worker on worker w (cost=0.56..604,413.66 rows=2,101,977 width=8) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using idx_route_created_date_worker_id on route r (cost=0.57..786.44 rows=484 width=8) (actual rows= loops=)

  • Index Cond: ((worker_id = w.id) AND (created_date >= '2020-02-01 00:00:00'::timestamp without time zone))
  • Filter: ((route_state)::text = 'COMPLETED'::text)
14. 0.000 0.000 ↓ 0.0

Index Scan using idx_worker_state_machine_trail_id_type_smid on worker_state_machine_trail wsmt (cost=0.70..139.57 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((entity_id = r.worker_id) AND ((state_machine_id)::text = 'WORKER_ONBOARDING_STATE_MACHINE'::text))
  • Filter: ((created_date <= '2020-03-15 23:59:59'::timestamp without time zone) AND ((current_state)::text = 'APPROVED'::text))