explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nfHi

Settings
# exclusive inclusive rows x rows loops node
1. 0.693 284,562.567 ↑ 1.0 1 1

Aggregate (cost=8,963.51..8,963.52 rows=1 width=40) (actual time=284,562.567..284,562.567 rows=1 loops=1)

2. 2.876 284,561.874 ↓ 336.0 336 1

Nested Loop (cost=19.98..8,963.51 rows=1 width=7) (actual time=4.280..284,561.874 rows=336 loops=1)

3. 4.555 284,542.042 ↓ 1,884.0 1,884 1

Nested Loop (cost=19.70..8,959.90 rows=1 width=14) (actual time=1.989..284,542.042 rows=1,884 loops=1)

4. 2.665 284,522.415 ↓ 1,884.0 1,884 1

Nested Loop (cost=19.27..8,956.14 rows=1 width=26) (actual time=1.971..284,522.415 rows=1,884 loops=1)

5. 5.994 68.570 ↓ 12.4 780 1

Nested Loop (cost=18.70..8,456.37 rows=63 width=12) (actual time=1.208..68.570 rows=780 loops=1)

6. 17.711 18.286 ↓ 5.9 4,429 1

Bitmap Heap Scan on processo_cnj_classes pcc (cost=18.28..2,228.62 rows=755 width=4) (actual time=0.863..18.286 rows=4,429 loops=1)

  • Recheck Cond: (fk_cnj_classe = 282)
  • Heap Blocks: exact=2463
7. 0.575 0.575 ↓ 5.9 4,429 1

Bitmap Index Scan on ind_processo_cnj_classes_fk_cnj_classe (cost=0.00..18.09 rows=755 width=0) (actual time=0.575..0.575 rows=4,429 loops=1)

  • Index Cond: (fk_cnj_classe = 282)
8. 44.290 44.290 ↓ 0.0 0 4,429

Index Scan using autos_repid on autos a (cost=0.43..8.25 rows=1 width=8) (actual time=0.010..0.010 rows=0 loops=4,429)

  • Index Cond: (id = pcc.fk_processo)
  • Filter: ((dt_distribuicao < '2018-11-01'::date) AND (st_fisica_processo = 0))
  • Rows Removed by Filter: 1
9. 284,451.180 284,451.180 ↓ 2.0 2 780

Index Scan using ind_processosandamentos_processo3 on processosandamentos pa2 (cost=0.56..7.92 rows=1 width=14) (actual time=213.688..364.681 rows=2 loops=780)

  • Index Cond: ((fkprocesso = a.id) AND (fklotacao = a.fk_lotacao))
  • Filter: ((date(dtfinalizacao) >= '2018-11-01'::date) AND (date(dtfinalizacao) <= '2018-11-30'::date))
  • Rows Removed by Filter: 113
10. 15.072 15.072 ↑ 1.0 1 1,884

Index Only Scan using ind_processo_1g_fk_processo on processo_1g p1g (cost=0.43..3.75 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1,884)

  • Index Cond: (fk_processo = a.id)
  • Heap Fetches: 7
11. 16.956 16.956 ↓ 0.0 0 1,884

Index Only Scan using ind_pe_login_fk_tipo_especialidade on pessoas_especialidade pe (cost=0.29..3.60 rows=1 width=11) (actual time=0.009..0.009 rows=0 loops=1,884)

  • Index Cond: ((login = (pa2.usuario)::text) AND (fk_lotacao = pa2.fklotacao))
  • Filter: (fk_tipo_especialidade = ANY ('{1,3,5,6,16,9,40}'::integer[]))
  • Rows Removed by Filter: 0
  • Heap Fetches: 60
Planning time : 4.472 ms
Execution time : 284,562.679 ms