explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Tnu

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

Insert on tmp_queue_event (cost=2.38..5.37 rows=1 width=91) (actual time=0.021..0.021 rows=0 loops=1)

2.          

CTE ctv

3. 0.000 0.006 ↓ 0.0 0 1

Limit (cost=1.02..1.04 rows=1 width=30) (actual time=0.006..0.006 rows=0 loops=1)

4. 0.001 0.006 ↓ 0.0 0 1

LockRows (cost=1.02..1.04 rows=1 width=30) (actual time=0.005..0.006 rows=0 loops=1)

5. 0.003 0.005 ↓ 0.0 0 1

Sort (cost=1.02..1.03 rows=1 width=30) (actual time=0.005..0.005 rows=0 loops=1)

  • Sort Key: qe.created_date
  • Sort Method: quicksort Memory: 25kB
6. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on queue_event qe (cost=0.00..1.01 rows=1 width=30) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((NOT is_failed) AND (status_code = 0))
  • Rows Removed by Filter: 1
7.          

CTE ctv_upd

8. 0.001 0.011 ↓ 0.0 0 1

Update on queue_event qeu (cost=0.00..1.04 rows=1 width=135) (actual time=0.010..0.011 rows=0 loops=1)

9. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.00..1.04 rows=1 width=135) (actual time=0.010..0.010 rows=0 loops=1)

  • Join Filter: (qeu.event_id = t.event_id)
10. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on queue_event qeu (cost=0.00..1.01 rows=1 width=93) (actual time=0.002..0.002 rows=1 loops=1)

11. 0.007 0.007 ↓ 0.0 0 1

CTE Scan on ctv t (cost=0.00..0.02 rows=1 width=56) (actual time=0.007..0.007 rows=0 loops=1)

12. 0.001 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.30..3.29 rows=1 width=91) (actual time=0.021..0.021 rows=0 loops=1)

13. 0.000 0.020 ↓ 0.0 0 1

Nested Loop (cost=0.17..2.28 rows=1 width=86) (actual time=0.020..0.020 rows=0 loops=1)

14. 0.006 0.020 ↓ 0.0 0 1

Hash Join (cost=0.03..1.29 rows=1 width=76) (actual time=0.020..0.020 rows=0 loops=1)

  • Hash Cond: (et.event_type_id = tt.event_type_id)
15. 0.003 0.003 ↑ 18.0 1 1

Seq Scan on event_type et (cost=0.00..1.18 rows=18 width=6) (actual time=0.003..0.003 rows=1 loops=1)

16. 0.000 0.011 ↓ 0.0 0 1

Hash (cost=0.02..0.02 rows=1 width=74) (actual time=0.011..0.011 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
17. 0.011 0.011 ↓ 0.0 0 1

CTE Scan on ctv_upd tt (cost=0.00..0.02 rows=1 width=74) (actual time=0.011..0.011 rows=0 loops=1)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_object_type on object_type ot (cost=0.13..0.82 rows=1 width=14) (never executed)

  • Index Cond: (object_type_id = et.object_type_id)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_action_type on action_type at1 (cost=0.13..0.82 rows=1 width=9) (never executed)

  • Index Cond: (action_type_id = et.action_type_id)