explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k8Fh

Settings
# exclusive inclusive rows x rows loops node
1. 0.423 124.996 ↓ 777.0 777 1

Nested Loop Left Join (cost=10,396.81..48,646.59 rows=1 width=251) (actual time=74.873..124.996 rows=777 loops=1)

2. 0.491 123.019 ↓ 777.0 777 1

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

3. 0.502 121.751 ↓ 777.0 777 1

Nested Loop (cost=10,396.39..48,632.73 rows=1 width=216) (actual time=74.828..121.751 rows=777 loops=1)

4. 0.470 119.695 ↓ 777.0 777 1

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

5. 0.884 117.671 ↓ 777.0 777 1

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

6. 0.000 104.355 ↓ 777.0 777 1

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

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

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

  • Workers Planned: 3
  • Workers Launched: 3
8. 0.544 113.388 ↓ 5.0 5 4 / 4

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

9. 31.888 77.322 ↓ 1.0 3,552 4 / 4

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

  • Hash Cond: ("Ras.Det.Rota".fk_entregador = "Ras.Det.Rota.Entregador.Usuario".fk_entregador)
10. 28.672 28.672 ↑ 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.017..28.672 rows=185,025 loops=4)

11. 0.049 16.762 ↑ 1.6 52 4 / 4

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
12. 16.713 16.713 ↑ 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.132..16.713 rows=81 loops=4)

  • Filter: (fk_courier = 53)
  • Rows Removed by Filter: 5,588
13. 35.523 35.523 ↓ 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.010..0.010 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.735 0.735 ↑ 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.014..0.035 rows=37 loops=21)

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

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

  • Index Cond: ((codigo)::text = ("Ras".fk_remessa)::text)
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)