explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r7v3

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 2,420.777 ↓ 10.0 10 1

Limit (cost=83,918.35..83,918.35 rows=1 width=326) (actual time=2,420.771..2,420.777 rows=10 loops=1)

2. 0.220 2,420.771 ↓ 1.8 30 1

Sort (cost=83,918.30..83,918.35 rows=17 width=326) (actual time=2,420.762..2,420.771 rows=30 loops=1)

  • Sort Key: processodo0_.dt_juntada DESC
  • Sort Method: quicksort Memory: 43kB
3. 0.109 2,420.551 ↓ 3.5 59 1

Nested Loop Left Join (cost=43,776.81..83,917.96 rows=17 width=326) (actual time=1,830.731..2,420.551 rows=59 loops=1)

4. 1.209 2,420.383 ↓ 3.5 59 1

Nested Loop (cost=43,776.66..83,914.24 rows=17 width=318) (actual time=1,830.725..2,420.383 rows=59 loops=1)

5. 352.933 2,141.757 ↓ 32.4 39,631 1

Bitmap Heap Scan on tb_processo_documento processodo0_ (cost=43,776.23..74,654.49 rows=1,223 width=318) (actual time=1,794.960..2,141.757 rows=39,631 loops=1)

  • Recheck Cond: ((dt_juntada > '2019-04-25 00:00:00.732'::timestamp without time zone) AND ((id_papel)::integer = ANY ('{1005,5200,1655,1656}'::integer[])))
  • Filter: ((NOT in_lido) AND (id_documento_principal IS NULL) AND in_ativo AND (id_documento_principal IS NULL) AND in_ativo AND (NOT in_lido) AND (NOT in_lido) AND in_ativo AND (id_documento_principal IS NULL) AND in_ativo AND (id_documento_principal IS
  • Rows Removed by Filter: 148739
  • Heap Blocks: exact=33459
6. 15.965 1,788.824 ↓ 0.0 0 1

BitmapAnd (cost=43,776.23..43,776.23 rows=8,370 width=0) (actual time=1,788.824..1,788.824 rows=0 loops=1)

7. 81.019 81.019 ↓ 1.3 360,815 1

Bitmap Index Scan on idx_tb_processo_documento9 (cost=0.00..18,790.57 rows=272,388 width=0) (actual time=81.019..81.019 rows=360,815 loops=1)

  • Index Cond: ((dt_juntada > '2019-04-25 00:00:00.732'::timestamp without time zone) AND (dt_juntada > '2019-04-25 00:00:00.732'::timestamp without time zone) AND (dt_juntada > '2019-04-25 00:00:00.732'::timestamp without time zone) AND (dt_j
8. 1,691.840 1,691.840 ↓ 13.7 7,932,866 1

Bitmap Index Scan on idx_tb_processo_documento7 (cost=0.00..24,984.80 rows=581,039 width=0) (actual time=1,691.840..1,691.840 rows=7,932,866 loops=1)

  • Index Cond: (((id_papel)::integer = ANY ('{1005,5200,1655,1656}'::integer[])) AND ((id_papel)::integer = ANY ('{1005,5200,1655,1656}'::integer[])) AND ((id_papel)::integer = ANY ('{1005,5200,1655,1656}'::integer[])) AND ((id_papel)::integer
9. 277.417 277.417 ↓ 0.0 0 39,631

Index Scan using tb_processo_trf_fk on tb_processo_trf processotr1_ (cost=0.42..7.56 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=39,631)

  • Index Cond: ((id_processo_trf)::integer = (processodo0_.id_processo)::integer)
  • Filter: (((dt_autuacao)::timestamp without time zone <= '2019-04-25 00:00:00.732'::timestamp without time zone) AND ((dt_autuacao)::timestamp without time zone <= '2019-04-25 00:00:00.732'::timestamp without time zone) AND ((dt_autuacao)::timestamp wit
  • Rows Removed by Filter: 1
10. 0.059 0.059 ↓ 0.0 0 59

Index Scan using tb_documento_voto_pkey on tb_documento_voto processodo0_1_ (cost=0.15..0.21 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=59)

  • Index Cond: ((processodo0_.id_processo_documento)::integer = id_documento_voto)