explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sRko

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 1,710.447 ↑ 2.5 8 1

Limit (cost=63,113.28..63,113.33 rows=20 width=1,384) (actual time=1,710.446..1,710.447 rows=8 loops=1)

2.          

CTE alvos_pjur

3. 16.216 408.192 ↑ 1.0 61,765 1

Hash Join (cost=3,704.95..59,568.91 rows=64,383 width=96) (actual time=93.051..408.192 rows=61,765 loops=1)

  • Hash Cond: (cida_cidade.cida_esta_codigo = esta_estado.esta_codigo)
4. 35.132 391.927 ↑ 1.0 61,765 1

Hash Join (cost=3,702.53..59,386.12 rows=64,383 width=97) (actual time=92.965..391.927 rows=61,765 loops=1)

  • Hash Cond: (refe_referencia.refe_cida_codigo = cida_cidade.cida_codigo)
5. 269.351 325.398 ↑ 1.0 61,765 1

Bitmap Heap Scan on refe_referencia (cost=939.62..56,454.19 rows=64,383 width=85) (actual time=61.260..325.398 rows=61,765 loops=1)

  • Recheck Cond: (refe_pess_oras_codigo_local = 25916)
  • Filter: (COALESCE(refe_inativo, 'N'::bpchar) <> 'S'::bpchar)
  • Rows Removed by Filter: 20
  • Heap Blocks: exact=27857
6. 56.047 56.047 ↑ 1.0 61,785 1

Bitmap Index Scan on refe_referencia_idx_70430 (cost=0.00..923.52 rows=64,706 width=0) (actual time=56.047..56.047 rows=61,785 loops=1)

  • Index Cond: (refe_pess_oras_codigo_local = 25916)
7. 13.914 31.397 ↑ 1.4 45,430 1

Hash (cost=1,992.96..1,992.96 rows=61,596 width=20) (actual time=31.397..31.397 rows=45,430 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2929kB
8. 17.483 17.483 ↑ 1.4 45,430 1

Seq Scan on cida_cidade (cost=0.00..1,992.96 rows=61,596 width=20) (actual time=0.007..17.483 rows=45,430 loops=1)

9. 0.025 0.049 ↑ 1.0 63 1

Hash (cost=1.63..1.63 rows=63 width=7) (actual time=0.048..0.049 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
10. 0.024 0.024 ↑ 1.0 63 1

Seq Scan on esta_estado (cost=0.00..1.63 rows=63 width=7) (actual time=0.006..0.024 rows=63 loops=1)

11. 0.131 1,710.443 ↑ 15.5 8 1

Sort (cost=3,544.36..3,544.67 rows=124 width=1,384) (actual time=1,710.442..1,710.443 rows=8 loops=1)

  • Sort Key: alvos_pjur.refe_descricao
  • Sort Method: quicksort Memory: 26kB
12. 1,710.312 1,710.312 ↑ 15.5 8 1

CTE Scan on alvos_pjur (cost=0.00..3,541.07 rows=124 width=1,384) (actual time=211.258..1,710.312 rows=8 loops=1)

  • Filter: ((upper(translate((refe_descricao)::text, 'ŠŽšžŸÁÇÉÍÓÚÀÈÌÒÙÂÊÎÔÛÃÕËÜÏÖÑÝåáçéíóúàèìòùâêîôûãõëüïöñýÿ'::text, 'SZszYACEIOUAEIOUAEIOUAOEUIONYaaceiouaeiouaeiouaoeuionyy'::text)) ~~ '%AFRICA%'::t
  • Rows Removed by Filter: 61757
Planning time : 3.198 ms
Execution time : 1,721.080 ms