explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OY3W

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.188 ↑ 1,532.0 18 1

Limit (cost=91.18..305,063.60 rows=27,576 width=70) (actual time=0.168..0.188 rows=18 loops=1)

2.          

Initplan (for Limit)

3. 0.006 0.154 ↑ 1.0 1 1

Aggregate (cost=90.73..90.75 rows=1 width=8) (actual time=0.154..0.154 rows=1 loops=1)

4. 0.148 0.148 ↑ 1.2 82 1

Index Scan using uk1_job on job rj (cost=0.27..90.49 rows=99 width=0) (actual time=0.025..0.148 rows=82 loops=1)

  • Filter: ((activity_category)::text = 'test3'::text)
  • Rows Removed by Filter: 201
5. 0.032 0.032 ↑ 15,320.3 18 1

Index Scan using idx4_job on job j (cost=0.42..3,049,779.91 rows=275,765 width=70) (actual time=0.013..0.032 rows=18 loops=1)

  • Index Cond: ((activity_category)::text = 'test3'::text)
  • Filter: (((postponed_to IS NULL) OR (postponed_to <= now())) AND ((exclusivity IS NULL) OR ((exclusivity IS NOT NULL) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2)) AND (NOT (SubPlan 3)))))
6.          

SubPlan (for Index Scan)

7. 0.000 0.000 ↓ 0.0 0

Index Only Scan using uk1_job on job j1 (cost=0.27..8.29 rows=1 width=0) (never executed)

  • Index Cond: (exclusivity = (j.exclusivity)::text)
  • Heap Fetches: 0
8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using uk1_job on job j1_1 (cost=0.27..89.74 rows=298 width=32) (never executed)

  • Heap Fetches: 0
9. 0.000 0.000 ↓ 0.0 0

Seq Scan on job j2 (cost=0.00..36,697.57 rows=56,542 width=0) (never executed)

  • Filter: ((postponed_to IS NULL) AND (updated_on < j.updated_on) AND ((j.exclusivity)::text = (CASE WHEN ((status_code)::text = 'pending'::text) THEN exclusivity ELSE NULL::character varying END)::text))
Planning time : 0.871 ms
Execution time : 0.258 ms