explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nosT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 95.421 ↓ 21.1 1,499 1

Nested Loop (cost=9,068.28..224,865.54 rows=71 width=210) (actual time=21.755..95.421 rows=1,499 loops=1)

2. 0.029 0.029 ↑ 1.0 1 1

Index Only Scan using "Courier_pkey" on "Courier" "Ras.Det.ResponsavelLancamento.Courier" (cost=0.15..4.17 rows=1 width=4) (actual time=0.027..0.029 rows=1 loops=1)

  • Index Cond: (codigo = 53)
  • Heap Fetches: 0
3. 16.010 108.487 ↓ 21.1 1,499 1

Gather (cost=9,068.13..224,860.66 rows=71 width=214) (actual time=21.727..108.487 rows=1,499 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 0.786 92.477 ↓ 17.9 750 2 / 2

Nested Loop (cost=8,068.13..223,853.56 rows=42 width=214) (actual time=19.527..92.477 rows=750 loops=2)

5. 0.239 82.685 ↓ 1.8 750 2 / 2

Nested Loop (cost=8,067.57..221,552.25 rows=418 width=135) (actual time=19.489..82.685 rows=750 loops=2)

6. 5.727 79.444 ↓ 3.9 750 2 / 2

Hash Join (cost=8,067.00..63,083.39 rows=194 width=115) (actual time=19.468..79.444 rows=750 loops=2)

  • Hash Cond: ("Ras.Det".fk_usuario = "Ras.Det.ResponsavelLancamento".codigo)
7. 69.059 69.059 ↓ 3.0 72,671 2 / 2

Parallel Index Scan using idx_rastramento_detalhamento_data_hora_ocorrencia on "RastreamentoDetalhamento" "Ras.Det" (cost=0.57..54,952.70 rows=24,462 width=60) (actual time=0.051..69.059 rows=72,671 loops=2)

  • Index Cond: ((data_hora_ocorrencia >= '2020-01-29 00:00:00-03'::timestamp with time zone) AND (data_hora_ocorrencia <= '2020-01-29 23:59:00-03'::timestamp with time zone))
  • Filter: (fk_ocorrencia <> ALL ('{1,2,4,5,6,7,8,9,79}'::integer[]))
  • Rows Removed by Filter: 26454
8. 0.015 4.658 ↓ 1.2 52 2 / 2

Hash (cost=8,065.87..8,065.87 rows=45 width=59) (actual time=4.658..4.658 rows=52 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
9. 2.736 4.643 ↓ 1.2 52 2 / 2

Bitmap Heap Scan on "Usuario" "Ras.Det.ResponsavelLancamento" (cost=1,544.31..8,065.87 rows=45 width=59) (actual time=2.141..4.643 rows=52 loops=2)

  • Recheck Cond: (fk_entregador IS NOT NULL)
  • Filter: ((codigo <> 10) AND (fk_courier = 53))
  • Rows Removed by Filter: 3133
  • Heap Blocks: exact=1628
10. 1.907 1.907 ↓ 1.0 3,193 2 / 2

Bitmap Index Scan on "Usuaurio_fk_entregador_key" (cost=0.00..1,544.30 rows=3,185 width=0) (actual time=1.907..1.907 rows=3,193 loops=2)

  • Index Cond: (fk_entregador IS NOT NULL)
11. 3.002 3.002 ↑ 1,959.0 1 1,501 / 2

Index Scan using "Rastreamento_fk_detalhamento_idx" on "Rastreamento" "Ras" (cost=0.57..797.26 rows=1,959 width=28) (actual time=0.004..0.004 rows=1 loops=1,501)

  • Index Cond: (fk_detalhamento = "Ras.Det".codigo)
12. 9.006 9.006 ↑ 1.0 1 1,501 / 2

Index Scan using "Remessa_pkey" on "Remessa" (cost=0.56..5.51 rows=1 width=79) (actual time=0.012..0.012 rows=1 loops=1,501)

  • Index Cond: ((codigo)::text = ("Ras".fk_remessa)::text)
  • Filter: (data_cadastro >= '2019-12-15 00:00:00-03'::timestamp with time zone)
  • Rows Removed by Filter: 0
Planning time : 2.262 ms