explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VDD6

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 290.721 ↑ 1.0 30 1

Limit (cost=761,596.11..761,596.18 rows=30 width=1,428) (actual time=290.712..290.721 rows=30 loops=1)

2. 56.374 290.715 ↑ 3,918.5 30 1

Sort (cost=761,596.11..761,890.00 rows=117,556 width=1,428) (actual time=290.711..290.715 rows=30 loops=1)

  • Sort Key: res.duedate_, res.type_
  • Sort Method: top-N heapsort Memory: 49kB
3. 142.804 234.341 ↓ 2.1 243,176 1

Bitmap Heap Scan on act_ru_job res (cost=25,933.07..758,124.16 rows=117,556 width=1,428) (actual time=98.093..234.341 rows=243,176 loops=1)

  • Recheck Cond: (((duedate_ <= '2020-03-23 23:37:47.262'::timestamp without time zone) AND (retries_ > 0) AND (suspension_state_ = 1)) OR ((duedate_ IS NULL) AND (retries_ > 0) AND (suspension_state_ = 1)))
  • Filter: (((lock_exp_time_ < '2020-03-23 23:37:47.262'::timestamp without time zone) OR (lock_owner_ IS NULL)) AND ((exclusive_ AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))) OR (NOT exclusive_)))
  • Heap Blocks: exact=36063
4. 0.002 85.428 ↓ 0.0 0 1

BitmapOr (cost=25,933.07..25,933.07 rows=242,135 width=0) (actual time=85.428..85.428 rows=0 loops=1)

5. 65.928 65.928 ↓ 1.3 303,946 1

Bitmap Index Scan on act_ru_job_idx4 (cost=0.00..12,937.15 rows=242,135 width=0) (actual time=65.928..65.928 rows=303,946 loops=1)

  • Index Cond: (duedate_ <= '2020-03-23 23:37:47.262'::timestamp without time zone)
6. 19.498 19.498 ↓ 0.0 0 1

Bitmap Index Scan on act_ru_job_idx4 (cost=0.00..12,937.15 rows=1 width=0) (actual time=19.498..19.498 rows=0 loops=1)

  • Index Cond: (duedate_ IS NULL)
7.          

SubPlan (for Bitmap Heap Scan)

8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using act_ru_job_idx2 on act_ru_job j2 (cost=0.41..2.63 rows=1 width=0) (never executed)

  • Index Cond: ((process_instance_id_ = (res.process_instance_id_)::text) AND (lock_exp_time_ >= '2020-03-23 23:37:47.262'::timestamp without time zone))
  • Heap Fetches: 0
9. 6.109 6.109 ↓ 0.0 0 1

Index Only Scan using act_ru_job_idx2 on act_ru_job j2_1 (cost=0.41..5,807.68 rows=1 width=32) (actual time=6.109..6.109 rows=0 loops=1)

  • Index Cond: (lock_exp_time_ >= '2020-03-23 23:37:47.262'::timestamp without time zone)
  • Heap Fetches: 0
Planning time : 0.605 ms
Execution time : 290.806 ms