explain.depesz.com

PostgreSQL's explain analyze made readable

Result: po9Pk

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 66.749 640.724 ↑ 1.1 335,965 1

Hash Left Join (cost=16,554.41..831,613.17 rows=370,834 width=105) (actual time=134.355..640.724 rows=335,965 loops=1)

  • Hash Cond: ("Servico".fk_cliente = "Servico.Cliente".codigo)
2. 232.047 573.940 ↑ 1.1 335,965 1

Hash Join (cost=16,551.22..830,558.70 rows=370,834 width=70) (actual time=134.307..573.940 rows=335,965 loops=1)

  • Hash Cond: ("Remessa".fk_servico = "Servico".codigo)
3. 246.139 340.703 ↑ 1.1 335,965 1

Bitmap Heap Scan on "Remessa" (cost=16,405.63..829,409.75 rows=374,488 width=49) (actual time=133.076..340.703 rows=335,965 loops=1)

  • Recheck Cond: ((fk_situacao_remessa = ANY ('{20,7,18,32}'::integer[])) AND (fk_tipo_remessa = ANY ('{1,3,4}'::integer[])) AND (data_cadastro >= '2020-01-01 00:00:00-03'::timestamp with time zone) AND (data_cadastro <= '2020-01-27 23:59:00-03'::timestamp with time zone))
  • Heap Blocks: exact=146638
4. 94.564 94.564 ↑ 1.1 336,539 1

Bitmap Index Scan on idx_remessa_situacao_tipo_remessa_data_cadastro (cost=0.00..16,312.01 rows=374,488 width=0) (actual time=94.564..94.564 rows=336,539 loops=1)

  • Index Cond: ((fk_situacao_remessa = ANY ('{20,7,18,32}'::integer[])) AND (fk_tipo_remessa = ANY ('{1,3,4}'::integer[])) AND (data_cadastro >= '2020-01-01 00:00:00-03'::timestamp with time zone) AND (data_cadastro <= '2020-01-27 23:59:00-03'::timestamp with time zone))
5. 0.145 1.190 ↑ 1.0 203 1

Hash (cost=143.05..143.05 rows=203 width=29) (actual time=1.190..1.190 rows=203 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
6. 1.045 1.045 ↑ 1.0 203 1

Seq Scan on "Servico" (cost=0.00..143.05 rows=203 width=29) (actual time=0.019..1.045 rows=203 loops=1)

  • Filter: (show_dashboard IS NOT FALSE)
  • Rows Removed by Filter: 2
7. 0.014 0.035 ↑ 1.0 53 1

Hash (cost=2.53..2.53 rows=53 width=39) (actual time=0.035..0.035 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
8. 0.021 0.021 ↑ 1.0 53 1

Seq Scan on "Cliente" "Servico.Cliente" (cost=0.00..2.53 rows=53 width=39) (actual time=0.008..0.021 rows=53 loops=1)