explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pXc1

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

Delete on t_history_entry he (cost=0.29..44,750,623.19 rows=13,213 width=6) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Index Scan using t_history_entry_event_type_idx on t_history_entry he (cost=0.29..44,750,623.19 rows=13,213 width=6) (actual rows= loops=)

  • Index Cond: ((event_type)::text = 'STATE'::text)
  • Filter: ((data = '{"from":"RELEASED","to":"LOADED"}'::text) AND (NOT (SubPlan 2)))
3.          

SubPlan (for Index Scan)

4. 0.000 0.000 ↓ 0.0

Result (cost=1,480.24..1,480.25 rows=1 width=8) (actual rows= loops=)

5.          

Initplan (for Result)

6. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..1,480.24 rows=1 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_history_entry_id on t_history_entry heinner (cost=0.29..2,960.18 rows=2 width=8) (actual rows= loops=)

  • Index Cond: (id IS NOT NULL)
  • Filter: (((event_type)::text = 'STATE'::text) AND (fk_history_id = he.fk_history_id) AND (data = '{"from":"RELEASED","to":"LOADED"}'::text))