explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N05p

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.052 ↑ 15.8 4 1

Append (cost=9.72..42.80 rows=63 width=265) (actual time=0.050..0.052 rows=4 loops=1)

2. 0.000 0.020 ↓ 0.0 0 1

Nested Loop (cost=9.72..19.15 rows=1 width=265) (actual time=0.020..0.020 rows=0 loops=1)

  • Join Filter: (appointments_statuses.group_id = group_members.group_id)
3. 0.020 0.020 ↓ 0.0 0 1

Index Scan using appointments_statuses_pkey on appointments_statuses (cost=9.72..17.74 rows=1 width=265) (actual time=0.019..0.020 rows=0 loops=1)

  • Index Cond: (appointment_status_id = 3)
  • Filter: ((NOT is_system) AND (NOT deleted) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 1
4.          

SubPlan (forIndex Scan)

5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..9.57 rows=1 width=4) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Seq Scan on group_members group_members_1 (cost=0.00..1.40 rows=1 width=4) (never executed)

  • Filter: (osteopath_id = 3350)
7. 0.000 0.000 ↓ 0.0 0

Index Scan using appointments_statuses_group_id_index on appointments_statuses appointments_statuses_2 (cost=0.14..8.16 rows=1 width=8) (never executed)

  • Index Cond: (group_id = group_members_1.group_id)
8. 0.000 0.000 ↓ 0.0 0

Seq Scan on group_members (cost=0.00..1.40 rows=1 width=4) (never executed)

  • Filter: (osteopath_id = 3350)
9. 0.017 0.031 ↑ 15.5 4 1

Seq Scan on appointments_statuses appointments_statuses_1 (cost=9.57..22.70 rows=62 width=265) (actual time=0.030..0.031 rows=4 loops=1)

  • Filter: (is_system AND (NOT (hashed SubPlan 2)))
10.          

SubPlan (forSeq Scan)

11. 0.003 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.14..9.57 rows=1 width=4) (actual time=0.014..0.014 rows=0 loops=1)

12. 0.007 0.007 ↓ 4.0 4 1

Seq Scan on group_members group_members_2 (cost=0.00..1.40 rows=1 width=4) (actual time=0.006..0.007 rows=4 loops=1)

  • Filter: (osteopath_id = 3350)
  • Rows Removed by Filter: 28
13. 0.004 0.004 ↓ 0.0 0 4

Index Scan using appointments_statuses_group_id_index on appointments_statuses appointments_statuses_3 (cost=0.14..8.16 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=4)

  • Index Cond: (group_id = group_members_2.group_id)
Planning time : 0.560 ms
Execution time : 0.112 ms