explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dF2 : Query 1 Robson

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

Nested Loop (cost=19.30..39,041.38 rows=1 width=632) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=19.15..39,041.14 rows=1 width=535) (actual rows= loops=)

  • Join Filter: ((bs.cd_bem_generico)::text = (g.cd_bem_generico)::text)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=19.15..38,921.75 rows=1 width=530) (actual rows= loops=)

  • Join Filter: ((furi.cd_bem_servico)::text = (bs.cd_bem_servico)::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=18.87..38,921.43 rows=1 width=500) (actual rows= loops=)

  • Join Filter: ((ug.cd_ug)::text = (furi.cd_ug)::text)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=18.45..766.99 rows=9 width=541) (actual rows= loops=)

  • Join Filter: ((ug.cd_ug)::text = (au.cd_ug)::text)
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18.45..760.76 rows=49 width=95) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=18.03..734.59 rows=49 width=110) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.75..719.40 rows=49 width=100) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.33..641.70 rows=10 width=137) (actual rows= loops=)

  • Join Filter: (((r.cd_orgao)::text = (ur_1.cd_orgao)::text) AND ((r.cd_agente)::text = (ur_1.cd_agente)::text))
10. 0.000 0.000 ↓ 0.0

Index Scan using ax_ur_idx03 on ax_ur ur_1 (cost=0.15..36.36 rows=283 width=20) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Materialize (cost=17.18..555.84 rows=10 width=139) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=17.18..555.79 rows=10 width=139) (actual rows= loops=)

  • Hash Cond: (((r.cd_orgao)::text = (au.cd_orgao)::text) AND ((r.cd_almoxarifado)::text = (au.cd_almoxarifado)::text))
13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ax_requisicao r (cost=15.23..551.02 rows=363 width=47) (actual rows= loops=)

  • Recheck Cond: (dt_requisicao > to_date('01/01/2019'::text, 'dd/mm/yyyy'::text))
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ax_requisicao_idx06 (cost=0.00..15.14 rows=363 width=0) (actual rows= loops=)

  • Index Cond: (dt_requisicao > to_date('01/01/2019'::text, 'dd/mm/yyyy'::text))
15. 0.000 0.000 ↓ 0.0

Hash (cost=1.38..1.38 rows=38 width=92) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on ax_almox_ug au (cost=0.00..1.38 rows=38 width=92) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using ax_requisicao_item_idx03 on ax_requisicao_item ri (cost=0.42..7.69 rows=8 width=40) (actual rows= loops=)

  • Index Cond: ((cd_requisicao)::text = (r.cd_requisicao)::text)
  • Filter: (((r.cd_orgao)::text = (cd_orgao)::text) AND ((r.cd_almoxarifado)::text = (cd_almoxarifado)::text))
18. 0.000 0.000 ↓ 0.0

Index Only Scan using "CR_BEM_SERVICO_PK" on cr_bem_servico bs_1 (cost=0.29..0.31 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (cd_bem_servico = (ri.cd_bem_servico)::text)
19. 0.000 0.000 ↓ 0.0

Index Scan using ax_req_ug_lote_idx01 on ax_req_ug_lote rul (cost=0.42..0.52 rows=1 width=35) (actual rows= loops=)

  • Index Cond: (((ri.cd_orgao)::text = (cd_orgao)::text) AND ((ri.cd_almoxarifado)::text = (cd_almoxarifado)::text) AND ((ri.cd_requisicao)::text = (cd_requisicao)::text) AN
20. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.10 rows=7 width=446) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on cr_ug ug (cost=0.00..1.07 rows=7 width=446) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Index Scan using "AX_FECHA_CONS_UR_PK" on ax_fecha_cons_ur furi (cost=0.42..4,239.37 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (((cd_ur)::text = (ur_1.cd_ur)::text) AND ((cd_bem_servico)::text = (bs_1.cd_bem_servico)::text))
  • Filter: (to_date(((mm_fechamento)::text || (aa_fechamento)::text), 'MMYYYY'::text) = (SubPlan 1))
23.          

SubPlan (forIndex Scan)

24. 0.000 0.000 ↓ 0.0

Aggregate (cost=2,978.12..2,978.13 rows=1 width=4) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Index Scan using ax_fecha_cons_ur_idx02 on ax_fecha_cons_ur furii (cost=0.42..2,978.12 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (furi.dt_mov_inicio = dt_mov_inicio)
  • Filter: (((furi.cd_bem_servico)::text = (cd_bem_servico)::text) AND ((furi.cd_ug)::text = (cd_ug)::text) AND ((furi.cd_ur)::text = (cd_ur)::text))
26. 0.000 0.000 ↓ 0.0

Index Scan using "CR_BEM_SERVICO_PK" on cr_bem_servico bs (cost=0.29..0.31 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((cd_bem_servico)::text = (ri.cd_bem_servico)::text)
27. 0.000 0.000 ↓ 0.0

Seq Scan on cr_bem_generico g (cost=0.00..78.06 rows=3,306 width=25) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using ax_ur_idx03 on ax_ur ur (cost=0.15..0.22 rows=1 width=53) (actual rows= loops=)

  • Index Cond: ((cd_ur)::text = (furi.cd_ur)::text)