explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zkY

Settings
# exclusive inclusive rows x rows loops node
1. 0.494 236.199 ↓ 17.4 941 1

Hash Left Join (cost=5,831.92..483,579.46 rows=54 width=203) (actual time=70.283..236.199 rows=941 loops=1)

  • Hash Cond: ("Servico".fk_cliente = "Servico.Cliente".codigo)
2. 0.466 235.685 ↓ 17.4 941 1

Hash Left Join (cost=5,828.73..483,576.11 rows=54 width=168) (actual time=70.258..235.685 rows=941 loops=1)

  • Hash Cond: ("Remessa".fk_courier_destino = "CourierDestino".codigo)
3. 0.568 235.142 ↓ 17.4 941 1

Hash Left Join (cost=5,812.05..483,559.29 rows=54 width=130) (actual time=70.177..235.142 rows=941 loops=1)

  • Hash Cond: ("Remessa".fk_courier_com_a_remessa = "LocalCourier".codigo)
4. 1.177 234.472 ↓ 17.4 941 1

Nested Loop (cost=5,795.36..483,542.46 rows=54 width=92) (actual time=70.065..234.472 rows=941 loops=1)

5. 199.543 230.472 ↓ 17.1 941 1

Bitmap Heap Scan on "Remessa" (cost=5,795.09..483,310.61 rows=55 width=71) (actual time=70.042..230.472 rows=941 loops=1)

  • Recheck Cond: (fk_situacao_remessa = ANY ('{9,13,14,11,15,17,10,21}'::integer[]))
  • Filter: ((fk_ocorrencia_devolucao IS NULL) AND (NOT postagem) AND (fk_ultima_ocorrencia_rastreamento <> 78) AND (data_prevista_entrega_reversa >= '2020-01-03 00:00:00-03'::timestamp with time zone) AND (data_prevista_entrega_reversa <= '2020-02-13 23:59:00-03'::timestamp with time zone) AND ((fk_courier_destino = 96) OR (fk_courier_destino1 = 96) OR (fk_courier_coleta = 96)))
  • Rows Removed by Filter: 128,008
  • Heap Blocks: exact=80,322
6. 30.929 30.929 ↑ 1.3 131,859 1

Bitmap Index Scan on idx_remessa_situacao_tipo_remessa_data_coleta (cost=0.00..5,795.08 rows=173,140 width=0) (actual time=30.929..30.929 rows=131,859 loops=1)

  • Index Cond: (fk_situacao_remessa = ANY ('{9,13,14,11,15,17,10,21}'::integer[]))
7. 2.823 2.823 ↑ 1.0 1 941

Index Scan using "Servico_pkey" on "Servico" (cost=0.27..4.21 rows=1 width=29) (actual time=0.003..0.003 rows=1 loops=941)

  • Index Cond: (codigo = "Remessa".fk_servico)
  • Filter: (show_dashboard IS NOT FALSE)
8. 0.044 0.102 ↑ 1.1 272 1

Hash (cost=12.97..12.97 rows=297 width=42) (actual time=0.102..0.102 rows=272 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 29kB
9. 0.058 0.058 ↑ 1.1 272 1

Seq Scan on "Courier" "LocalCourier" (cost=0.00..12.97 rows=297 width=42) (actual time=0.010..0.058 rows=272 loops=1)

10. 0.039 0.077 ↑ 1.1 272 1

Hash (cost=12.97..12.97 rows=297 width=42) (actual time=0.077..0.077 rows=272 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 29kB
11. 0.038 0.038 ↑ 1.1 272 1

Seq Scan on "Courier" "CourierDestino" (cost=0.00..12.97 rows=297 width=42) (actual time=0.002..0.038 rows=272 loops=1)

12. 0.009 0.020 ↑ 1.0 53 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
13. 0.011 0.011 ↑ 1.0 53 1

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