explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0tQn

Settings
# exclusive inclusive rows x rows loops node
1. 13.599 600.701 ↑ 532.2 24 1

Unique (cost=27,650.09..27,713.96 rows=12,774 width=44) (actual time=574.555..600.701 rows=24 loops=1)

2. 51.152 587.102 ↓ 4.1 52,659 1

Sort (cost=27,650.09..27,682.03 rows=12,774 width=44) (actual time=574.553..587.102 rows=52,659 loops=1)

  • Sort Key: g.nm_geometria
  • Sort Method: quicksort Memory: 3598kB
3. 105.994 535.950 ↓ 4.1 52,659 1

Gather (cost=1,001.73..26,778.85 rows=12,774 width=44) (actual time=0.601..535.950 rows=52,659 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 112.316 429.956 ↓ 3.5 26,330 2

Nested Loop Left Join (cost=1.73..24,501.45 rows=7,514 width=44) (actual time=0.089..429.956 rows=26,330 loops=2)

5. 181.121 317.638 ↓ 3.5 26,330 2

Nested Loop (cost=1.30..20,871.08 rows=7,514 width=4) (actual time=0.085..317.638 rows=26,330 loops=2)

6. 97.387 136.497 ↓ 2.4 8,759 2

Nested Loop (cost=0.86..17,947.51 rows=3,638 width=4) (actual time=0.075..136.497 rows=8,759 loops=2)

7. 39.087 39.087 ↓ 1.2 3,451 2

Parallel Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..10,453.96 rows=2,811 width=4) (actual time=0.065..39.087 rows=3,451 loops=2)

  • Index Cond: (((id_filial)::integer = 47) AND (dt_inicio_terminal >= '2017-01-01 00:00:00'::timestamp without time zone) AND (dt_inicio_terminal <= '2018-01-01 23:59:00'::timestamp without time zone))
  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 3830
8. 0.023 0.023 ↓ 1.5 3 6,902

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.65 rows=2 width=8) (actual time=0.021..0.023 rows=3 loops=6,902)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
9. 0.020 0.020 ↑ 4.0 3 17,518

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..0.68 rows=12 width=8) (actual time=0.015..0.020 rows=3 loops=17,518)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
10. 0.002 0.002 ↓ 0.0 0 52,659

Index Scan using pk00_tb_geometria on tb_geometria g (cost=0.43..0.48 rows=1 width=48) (actual time=0.002..0.002 rows=0 loops=52,659)

  • Index Cond: ((id_geometria)::integer = (tv.id_local_clt)::integer)