explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wneK

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.782 103.978 ↓ 777.0 777 1

Nested Loop Left Join (cost=10,396.81..48,646.60 rows=1 width=251) (actual time=67.159..103.978 rows=777 loops=1)

2. 0.701 101.642 ↓ 777.0 777 1

Nested Loop (cost=10,396.53..48,640.91 rows=1 width=223) (actual time=67.147..101.642 rows=777 loops=1)

3. 0.811 100.164 ↓ 777.0 777 1

Nested Loop (cost=10,396.39..48,632.74 rows=1 width=216) (actual time=67.140..100.164 rows=777 loops=1)

4. 0.713 97.799 ↓ 777.0 777 1

Nested Loop (cost=10,395.98..48,627.43 rows=1 width=187) (actual time=67.128..97.799 rows=777 loops=1)

5. 0.715 95.532 ↓ 777.0 777 1

Nested Loop (cost=10,395.57..48,620.44 rows=1 width=136) (actual time=67.115..95.532 rows=777 loops=1)

6. 0.000 83.939 ↓ 777.0 777 1

Nested Loop (cost=10,395.01..48,614.91 rows=1 width=123) (actual time=67.087..83.939 rows=777 loops=1)

  • Join Filter: ("Ras.Det".codigo = "Ras".fk_detalhamento)
7. 14.693 108.306 ↓ 21.0 21 1

Gather (cost=10,394.44..47,803.92 rows=1 width=111) (actual time=67.069..108.306 rows=21 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
8. 1.728 93.613 ↓ 5.0 5 4 / 4

Nested Loop (cost=9,394.44..46,803.82 rows=1 width=111) (actual time=61.496..93.613 rows=5 loops=4)

9. 27.521 67.019 ↓ 1.0 3,552 4 / 4

Hash Join (cost=9,393.88..25,547.18 rows=3,411 width=83) (actual time=17.324..67.019 rows=3,552 loops=4)

  • Hash Cond: ("Ras.Det.Rota".fk_entregador = "Ras.Det.Rota.Entregador.Usuario".fk_entregador)
10. 22.313 22.313 ↑ 1.3 185,025 4 / 4

Parallel Seq Scan on "DetalhamentoRota" "Ras.Det.Rota" (cost=0.00..15,526.20 rows=238,720 width=20) (actual time=0.019..22.313 rows=185,025 loops=4)

11. 0.058 17.185 ↑ 1.6 52 4 / 4

Hash (cost=9,392.86..9,392.86 rows=81 width=63) (actual time=17.185..17.185 rows=52 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
12. 17.127 17.127 ↑ 1.0 81 4 / 4

Seq Scan on "Usuario" "Ras.Det.Rota.Entregador.Usuario" (cost=0.00..9,392.86 rows=81 width=63) (actual time=0.159..17.127 rows=81 loops=4)

  • Filter: (fk_courier = 53)
  • Rows Removed by Filter: 5588
13. 24.866 24.866 ↓ 0.0 0 14,209 / 4

Index Scan using "RastreamentoDetalhamento_pkey" on "RastreamentoDetalhamento" "Ras.Det" (cost=0.57..6.23 rows=1 width=28) (actual time=0.007..0.007 rows=0 loops=14,209)

  • Index Cond: (codigo = "Ras.Det.Rota".fk_rast_rota)
  • Filter: ((data_hora_ocorrencia >= '2020-01-22 00:00:00-03'::timestamp with time zone) AND (data_hora_ocorrencia <= '2020-01-22 23:59:00-03'::timestamp with time zone) AND (fk_ocorrencia = ANY ('{9,79}'::integer[])))
  • Rows Removed by Filter: 1
14. 0.441 0.441 ↑ 52.9 37 21

Index Scan using "Rastreamento_fk_detalhamento_idx" on "Rastreamento" "Ras" (cost=0.57..786.50 rows=1,959 width=28) (actual time=0.007..0.021 rows=37 loops=21)

  • Index Cond: (fk_detalhamento = "Ras.Det.Rota".fk_rast_rota)
15. 10.878 10.878 ↑ 1.0 1 777

Index Scan using "Remessa_pkey" on "Remessa" (cost=0.56..5.53 rows=1 width=13) (actual time=0.014..0.014 rows=1 loops=777)

  • Index Cond: ((codigo)::text = ("Ras".fk_remessa)::text)
  • Filter: (data_cadastro >= '2019-12-08 00:00:00-03'::timestamp with time zone)
16. 1.554 1.554 ↑ 1.0 1 777

Index Scan using "Usuario_pkey" on "Usuario" "Ras.Det.ResponsavelLancamento" (cost=0.41..6.99 rows=1 width=55) (actual time=0.002..0.002 rows=1 loops=777)

  • Index Cond: (codigo = "Ras.Det".fk_usuario)
  • Filter: (codigo <> 10)
17. 1.554 1.554 ↑ 1.0 1 777

Index Scan using "Entregador_pkey" on "Entregador" "Ras.Det.Rota.Entregador" (cost=0.41..5.30 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=777)

  • Index Cond: (codigo = "Ras.Det.Rota".fk_entregador)
18. 0.777 0.777 ↑ 1.0 1 777

Index Scan using "Courier_pkey" on "Courier" "Ras.Det.Rota.Entregador.Usuario.Courier" (cost=0.15..8.17 rows=1 width=11) (actual time=0.001..0.001 rows=1 loops=777)

  • Index Cond: (codigo = 53)
19. 1.554 1.554 ↑ 1.0 1 777

Index Scan using "Colaborador_pkey" on "Colaborador" "Ras.Det.Rota.Entregador.Usuario.Colaborador" (cost=0.28..5.68 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=777)

  • Index Cond: ("Ras.Det.Rota.Entregador.Usuario".fk_colaborador = codigo)
Planning time : 5.071 ms