explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FMMGu

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 9,032.775 ↑ 1.0 20 1

Limit (cost=153,499.15..153,501.54 rows=20 width=92) (actual time=9,030.599..9,032.775 rows=20 loops=1)

2. 8.196 9,032.759 ↑ 180.4 20 1

Gather Merge (cost=153,499.15..153,931.15 rows=3,608 width=92) (actual time=9,030.597..9,032.759 rows=20 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 0.370 9,024.563 ↑ 53.1 17 5 / 5

Sort (cost=152,499.09..152,501.34 rows=902 width=92) (actual time=9,024.562..9,024.563 rows=17 loops=5)

  • Sort Key: refe_referencia.refe_descricao
  • Sort Method: top-N heapsort Memory: 30kB
  • Worker 0: Sort Method: top-N heapsort Memory: 30kB
  • Worker 1: Sort Method: top-N heapsort Memory: 30kB
  • Worker 2: Sort Method: top-N heapsort Memory: 30kB
  • Worker 3: Sort Method: top-N heapsort Memory: 30kB
4. 0.280 9,024.193 ↑ 14.8 61 5 / 5

Hash Join (cost=2,194.66..152,475.09 rows=902 width=92) (actual time=183.449..9,024.193 rows=61 loops=5)

  • Hash Cond: (cida_cidade.cida_esta_codigo = esta_estado.esta_codigo)
5. 8,574.180 9,023.863 ↑ 14.8 61 5 / 5

Parallel Hash Join (cost=2,192.24..152,470.15 rows=902 width=93) (actual time=183.311..9,023.863 rows=61 loops=5)

  • Hash Cond: (refe_referencia.refe_cida_codigo = cida_cidade.cida_codigo)
  • Join Filter: (((refe_referencia.refe_pess_oras_codigo_local = 25916) AND (COALESCE(refe_referencia.refe_inativo, 'N'::bpchar) <> 'S'::bpchar)
  • Rows Removed by Join Filter: 690258
6. 442.595 442.595 ↑ 1.2 698,587 5 / 5

Parallel Seq Scan on refe_referencia (cost=0.00..148,011.17 rows=863,517 width=87) (actual time=0.023..442.595 rows=698,587 loops=5)

7. 3.636 7.088 ↑ 4.0 9,086 5 / 5

Parallel Hash (cost=1,739.33..1,739.33 rows=36,233 width=20) (actual time=7.087..7.088 rows=9,086 loops=5)

  • Buckets: 65536 Batches: 1 Memory Usage: 3072kB
8. 3.452 3.452 ↑ 4.0 9,086 5 / 5

Parallel Seq Scan on cida_cidade (cost=0.00..1,739.33 rows=36,233 width=20) (actual time=0.033..3.452 rows=9,086 loops=5)

9. 0.019 0.050 ↑ 1.0 63 5 / 5

Hash (cost=1.63..1.63 rows=63 width=7) (actual time=0.050..0.050 rows=63 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
10. 0.031 0.031 ↑ 1.0 63 5 / 5

Seq Scan on esta_estado (cost=0.00..1.63 rows=63 width=7) (actual time=0.018..0.031 rows=63 loops=5)

Planning time : 0.888 ms
Execution time : 9,032.888 ms