explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I5Z2

Settings
# exclusive inclusive rows x rows loops node
1. 6,765.804 6,765.804 ↑ 4,682.0 1 1

CTE Scan on slrstaffpostemp t (cost=167,453.69..167,547.33 rows=4,682 width=18) (actual time=2,725.603..6,765.804 rows=1 loops=1)

2.          

CTE slrstaffpostemp

3. 0.000 6,765.796 ↑ 4,682.0 1 1

Nested Loop (cost=8.58..167,453.69 rows=4,682 width=1,621) (actual time=2,725.596..6,765.796 rows=1 loops=1)

4.          

Initplan (for Nested Loop)

5. 0.191 0.191 ↑ 1.0 1 1

Result (cost=0.00..2.51 rows=1 width=1) (actual time=0.191..0.191 rows=1 loops=1)

6. 0.271 0.271 ↑ 1.0 1 1

Result (cost=0.00..2.51 rows=1 width=1) (actual time=0.270..0.271 rows=1 loops=1)

7. 6,764.739 6,765.073 ↑ 10,718.0 1 1

Seq Scan on slrstaffpos t_1 (cost=3.27..136,383.69 rows=10,718 width=1,589) (actual time=2,724.875..6,765.073 rows=1 loops=1)

  • Filter: ($1 AND ((NOT (hashed SubPlan 1)) OR (iddepartment IS NULL)) AND (dbegin <= cmn.todate('31.01.2020 00:00:00'::character varying)) AND (instr((upper((smnemocode)::text))::character varying, '50344533'::character varying) <> 0) AND (COALESCE(dend, cmn.todate('31.01.2020 00:00:00'::character varying)) >= cmn.todate('01.01.2020 00:00:00'::character varying)))
  • Rows Removed by Filter: 129262
8.          

SubPlan (for Seq Scan)

9. 0.333 0.334 ↓ 19.1 1,907 1

ProjectSet (cost=0.00..3.02 rows=100 width=32) (actual time=0.172..0.334 rows=1,907 loops=1)

10. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.001 rows=1 loops=1)

11. 0.708 0.708 ↑ 1.0 1 1

Index Scan using pk_slrdepartment on slrdepartment r (cost=0.29..2.89 rows=1 width=24) (actual time=0.708..0.708 rows=1 loops=1)

  • Index Cond: (id = t_1.iddepartment)
  • Filter: ($2 AND ((id <> ALL (adm_pfuncafi.gettblaccessforattr_notin(SESSION_USER, 'slrdepartment'::name, '-122001'::numeric))) OR (id IS NULL)))
Planning time : 2.377 ms
Execution time : 6,768.412 ms