explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ltWH

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

Seq Scan on public.slrkadr t (cost=2.51..1,491.42 rows=28 width=5,866) (actual rows= loops=)

  • Output: t.id, t.id, (slr_kadrapi.getheadline(t.id, 'SHORT'::character varying))::character varying(254), t.ssecondname, t.sfirstname, t.sthirdname, t.dbirthdate, CASE WHEN ((t.lsex)::text = 'Y'::text) THEN 1 ELSE 0 END, slr_sexafi.getheadline((CASE WHEN (...)
  • Filter: ($0 AND ((alternatives: SubPlan 7 or hashed SubPlan 13) OR ((t.lworker)::text = 'N'::text)) AND (instr((upper((t.snm)::text))::character varying, 'УВАРОВ'::character varying) <> 0))
2.          

Initplan (for Seq Scan)

3. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrkadr'::name)
4.          

SubPlan (for Seq Scan)

5. 0.000 0.000 ↓ 0.0

Index Scan using fk_slrcard_kadr on public.slrcard (cost=2.65..13.86 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (slrcard.idkadr = t.id)
  • Filter: ($2 AND (alternatives: SubPlan 4 or hashed SubPlan 6))
6.          

Initplan (for Index Scan)

7. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrcard'::name)
8.          

SubPlan (for Index Scan)

9. 0.000 0.000 ↓ 0.0

Index Only Scan using ix_slrmovement_card_dep on public.slrmovement (cost=2.65..8.19 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement.idcard = slrcard.id)
  • Filter: ($4 AND ((slrmovement.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric))) OR (slrmovement.iddepartment IS NULL)))
10.          

Initplan (for Index Only Scan)

11. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrmovement'::name)
12. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on public.slrmovement slrmovement_1 (cost=11.48..148.30 rows=27 width=6) (actual rows= loops=)

  • Output: slrmovement_1.idcard
  • Recheck Cond: ((slrmovement_1.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric))) OR (slrmovement_1.iddepartment IS NULL))
  • Filter: $6
13.          

Initplan (for Bitmap Heap Scan)

14. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrmovement'::name)
15. 0.000 0.000 ↓ 0.0

BitmapOr (cost=8.97..8.97 rows=53 width=0) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fk_slrmovement_department (cost=0.00..7.30 rows=53 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement_1.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric)))
17. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fk_slrmovement_department (cost=0.00..1.65 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement_1.iddepartment IS NULL)
18. 0.000 0.000 ↓ 0.0

Seq Scan on public.slrcard slrcard_1 (cost=2.51..571.14 rows=17 width=6) (actual rows= loops=)

  • Output: slrcard_1.idkadr
  • Filter: ($8 AND (alternatives: SubPlan 10 or hashed SubPlan 12))
19.          

Initplan (for Seq Scan)

20. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrcard'::name)
21.          

SubPlan (for Seq Scan)

22. 0.000 0.000 ↓ 0.0

Index Only Scan using ix_slrmovement_card_dep on public.slrmovement slrmovement_2 (cost=2.65..8.19 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement_2.idcard = slrcard_1.id)
  • Filter: ($10 AND ((slrmovement_2.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric))) OR (slrmovement_2.iddepartment IS NULL)))
23.          

Initplan (for Index Only Scan)

24. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrmovement'::name)
25. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on public.slrmovement slrmovement_3 (cost=11.48..148.30 rows=27 width=6) (actual rows= loops=)

  • Output: slrmovement_3.idcard
  • Recheck Cond: ((slrmovement_3.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric))) OR (slrmovement_3.iddepartment IS NULL))
  • Filter: $12
26.          

Initplan (for Bitmap Heap Scan)

27. 0.000 0.000 ↓ 0.0

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

  • Output: adm_pfuncafi.gettblaccess_s(SESSION_USER, 'slrmovement'::name)
28. 0.000 0.000 ↓ 0.0

BitmapOr (cost=8.97..8.97 rows=53 width=0) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fk_slrmovement_department (cost=0.00..7.30 rows=53 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement_3.iddepartment = ANY (adm_pfuncafi.gettblaccessforattr_in(SESSION_USER, 'slrmovement'::name, '102001'::numeric)))
30. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fk_slrmovement_department (cost=0.00..1.65 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (slrmovement_3.iddepartment IS NULL)