explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yjgx

Settings
# exclusive inclusive rows x rows loops node
1. 128.169 140,610.421 ↓ 15.3 74,839 1

Gather (cost=60,296.52..1,385,043.61 rows=4,891 width=93) (actual time=1,876.777..140,610.421 rows=74,839 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 30.560 140,482.252 ↓ 12.2 14,968 5 / 5

Hash Left Join (cost=59,296.52..1,383,554.51 rows=1,223 width=93) (actual time=1,716.177..140,482.252 rows=14,968 loops=5)

  • Hash Cond: ("Servico".fk_cliente = "Servico.Cliente".codigo)
3. 39.315 140,451.516 ↓ 12.2 14,968 5 / 5

Hash Join (cost=59,293.33..1,383,547.86 rows=1,223 width=58) (actual time=1,715.944..140,451.516 rows=14,968 loops=5)

  • Hash Cond: ("Remessa".fk_servico = "Servico".codigo)
4. 140,165.813 140,411.764 ↓ 12.1 14,968 5 / 5

Parallel Bitmap Heap Scan on "Remessa" (cost=59,147.74..1,383,398.96 rows=1,235 width=37) (actual time=1,715.444..140,411.764 rows=14,968 loops=5)

  • Recheck Cond: ((fk_situacao_remessa = ANY ('{8,2,14,11,10,15,17,13,1,19,9,30}'::integer[])) AND (fk_tipo_remessa = ANY ('{1,3,4}'::integer[])) AND (data_cadastro >= '2019-11-03 00:00:00-03'::timestamp with time zone) AND (data_cadastro <= '2020-02-04 00:00:00-03'::timestamp with time zone))
  • Filter: ((fk_ocorrencia_devolucao IS NULL) AND (fk_estado = 'MG'::bpchar) AND ((fk_courier_destino = 19) OR (fk_courier_destino1 = 19) OR (fk_courier_coleta = 19)))
  • Rows Removed by Filter: 393,931
  • Heap Blocks: exact=99,486
5. 245.951 245.951 ↓ 1.0 2,044,495 1 / 5

Bitmap Index Scan on idx_remessa_situacao_tipo_remessa_data_cadastro (cost=0.00..59,146.51 rows=1,995,093 width=0) (actual time=1,229.754..1,229.754 rows=2,044,495 loops=1)

  • Index Cond: ((fk_situacao_remessa = ANY ('{8,2,14,11,10,15,17,13,1,19,9,30}'::integer[])) AND (fk_tipo_remessa = ANY ('{1,3,4}'::integer[])) AND (data_cadastro >= '2019-11-03 00:00:00-03'::timestamp with time zone) AND (data_cadastro <= '2020-02-04 00:00:00-03'::timestamp with time zone))
6. 0.038 0.437 ↑ 1.0 203 5 / 5

Hash (cost=143.05..143.05 rows=203 width=29) (actual time=0.437..0.437 rows=203 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 21kB
7. 0.399 0.399 ↑ 1.0 203 5 / 5

Seq Scan on "Servico" (cost=0.00..143.05 rows=203 width=29) (actual time=0.016..0.399 rows=203 loops=5)

  • Filter: (show_dashboard IS NOT FALSE)
  • Rows Removed by Filter: 2
8. 0.058 0.176 ↑ 1.0 53 5 / 5

Hash (cost=2.53..2.53 rows=53 width=39) (actual time=0.176..0.176 rows=53 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
9. 0.118 0.118 ↑ 1.0 53 5 / 5

Seq Scan on "Cliente" "Servico.Cliente" (cost=0.00..2.53 rows=53 width=39) (actual time=0.075..0.118 rows=53 loops=5)