explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jrFp : Optimization for: plan #nosT

Settings

Optimization path:

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

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

2. 0.010 0.010 ↑ 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.009..0.010 rows=1 loops=1)

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

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

  • Workers Planned: 1
  • Workers Launched: 1
4. 0.386 79.676 ↓ 17.9 750 2 / 2

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

5. 0.625 71.034 ↓ 1.8 750 2 / 2

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

6. 5.304 68.158 ↓ 3.9 750 2 / 2

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

  • Hash Cond: ("Ras.Det".fk_usuario = "Ras.Det.ResponsavelLancamento".codigo)
7. 58.859 58.859 ↓ 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.044..58.859 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.024 3.995 ↓ 1.2 52 2 / 2

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
9. 2.588 3.971 ↓ 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=1.621..3.971 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.383 1.383 ↓ 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.383..1.383 rows=3,193 loops=2)

  • Index Cond: (fk_entregador IS NOT NULL)
11. 2.252 2.252 ↑ 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.003..0.003 rows=1 loops=1,501)

  • Index Cond: (fk_detalhamento = "Ras.Det".codigo)
12. 8.255 8.255 ↑ 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.011..0.011 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 : 0.931 ms