explain.depesz.com

PostgreSQL's explain analyze made readable

Result: buEu

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1.071 ↑ 1.0 1 1

Result (cost=93.22..93.23 rows=1 width=8) (actual time=1.071..1.071 rows=1 loops=1)

2.          

Initplan (forResult)

3. 0.002 1.069 ↑ 1.0 1 1

Subquery Scan on dados_1 (cost=8.75..93.22 rows=1 width=8) (actual time=1.069..1.069 rows=1 loops=1)

4. 0.016 1.067 ↑ 1.0 1 1

Index Only Scan using rhpessoal_regi_pk on rhpessoal (cost=8.75..93.17 rows=1 width=40) (actual time=1.067..1.067 rows=1 loops=1)

  • Index Cond: (rh01_regist = $9)
  • Heap Fetches: 0
5.          

Initplan (forIndex Only Scan)

6. 0.000 0.000 ↑ 1.0 1 1

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

7. 0.000 0.000 ↑ 1.0 1 1

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

8. 0.013 0.013 ↑ 1.0 1 1

Index Scan using assenta_codi_pk on assenta assenta_1 (cost=0.43..8.45 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (h16_codigo = 694798)
9.          

SubPlan (forIndex Only Scan)

10. 0.005 0.019 ↑ 1.0 1 1

Aggregate (cost=12.92..12.93 rows=1 width=8) (actual time=0.019..0.019 rows=1 loops=1)

11.          

Initplan (forAggregate)

12. 0.000 0.000 ↑ 1.0 1 1

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

13. 0.000 0.000 ↑ 1.0 1 1

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

14. 0.003 0.014 ↓ 3.0 3 1

Bitmap Heap Scan on assenta (cost=8.88..12.89 rows=1 width=4) (actual time=0.014..0.014 rows=3 loops=1)

  • Recheck Cond: (((h16_regist = rhpessoal.rh01_regist) AND (h16_assent = $0)) OR ((h16_regist = rhpessoal.rh01_regist) AND (h16_assent = $1)))
  • Heap Blocks: exact=1
15. 0.003 0.011 ↓ 0.0 0 1

BitmapOr (cost=8.88..8.88 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=1)

16. 0.006 0.006 ↓ 3.0 3 1

Bitmap Index Scan on assenta_reg_ass_in (cost=0.00..4.44 rows=1 width=0) (actual time=0.006..0.006 rows=3 loops=1)

  • Index Cond: ((h16_regist = rhpessoal.rh01_regist) AND (h16_assent = $0))
17. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on assenta_reg_ass_in (cost=0.00..4.44 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: ((h16_regist = rhpessoal.rh01_regist) AND (h16_assent = $1))
18. 0.907 1.008 ↑ 1.0 1 1

Function Scan on fc_direitos_niteroi_fme dados (cost=18.68..18.69 rows=1 width=4) (actual time=1.008..1.008 rows=1 loops=1)

19.          

Initplan (forFunction Scan)

20. 0.005 0.086 ↑ 1.0 1 1

Aggregate (cost=13.90..13.91 rows=1 width=32) (actual time=0.086..0.086 rows=1 loops=1)

21. 0.081 0.081 ↑ 1.0 3 1

Seq Scan on tipoasse (cost=0.00..13.89 rows=3 width=4) (actual time=0.069..0.081 rows=3 loops=1)

  • Filter: ((h12_assent)::text = ANY ('{308,327,AVER2}'::text[]))
  • Rows Removed by Filter: 498
22. 0.004 0.015 ↑ 1.0 1 1

Aggregate (cost=4.49..4.50 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=1)

23. 0.011 0.011 ↑ 1.0 10 1

Index Only Scan using rhrubricas_rubr_inst_pk on rhrubricas (cost=0.29..4.46 rows=10 width=5) (actual time=0.009..0.011 rows=10 loops=1)

  • Index Cond: (rh27_rubric = '0010'::bpchar)
  • Heap Fetches: 0
24. 0.000 0.011 ↓ 0.0 0 1

Limit (cost=48.77..48.78 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=1)

25. 0.003 0.011 ↓ 0.0 0 1

Sort (cost=48.77..48.78 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Sort Key: gerffx.r53_quant DESC
  • Sort Method: quicksort Memory: 25kB
26. 0.008 0.008 ↓ 0.0 0 1

Index Scan using gerffx_regist_anousu_mesusu_rubric_in on gerffx (cost=0.56..48.76 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((r53_regist = rhpessoal.rh01_regist) AND (r53_rubric = '0010'::bpchar))
  • Filter: ((r53_instit = (fc_getsession('DB_instit'::text))::integer) AND (r53_anousu = fc_anofolha((fc_getsession('DB_instit'::text))::integer)) AND (r53_mesusu = fc_mesfolha((fc_getsession('DB_instit'::text))::integer)))
Planning time : 0.489 ms
Execution time : 1.161 ms