explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6jEg

Settings
# exclusive inclusive rows x rows loops node
1. 3.036 204.062 ↑ 305.7 39 1

Unique (cost=25,968.90..26,028.52 rows=11,924 width=44) (actual time=198.196..204.062 rows=39 loops=1)

2. 32.094 201.026 ↓ 5.1 60,898 1

Sort (cost=25,968.90..25,998.71 rows=11,924 width=44) (actual time=198.195..201.026 rows=60,898 loops=1)

  • Sort Key: g.nm_geometria
  • Sort Method: quicksort Memory: 3625kB
3. 17.669 168.932 ↓ 5.1 60,898 1

Gather (cost=1,001.73..25,161.55 rows=11,924 width=44) (actual time=0.432..168.932 rows=60,898 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 37.308 151.263 ↓ 4.3 30,449 2

Nested Loop Left Join (cost=1.73..22,969.15 rows=7,014 width=44) (actual time=0.109..151.263 rows=30,449 loops=2)

5. 63.798 113.954 ↓ 4.3 30,449 2

Nested Loop (cost=1.30..19,580.35 rows=7,014 width=4) (actual time=0.106..113.954 rows=30,449 loops=2)

6. 24.328 50.151 ↓ 3.0 10,344 2

Nested Loop (cost=0.86..16,851.26 rows=3,396 width=4) (actual time=0.095..50.151 rows=10,344 loops=2)

7. 25.818 25.818 ↓ 1.6 4,270 2

Parallel Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..9,821.49 rows=2,624 width=4) (actual time=0.084..25.818 rows=4,270 loops=2)

  • Index Cond: (((id_filial)::integer = 195) 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: 14656
8. 0.005 0.005 ↑ 1.0 2 8,541

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.66 rows=2 width=8) (actual time=0.004..0.005 rows=2 loops=8,541)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
9. 0.005 0.005 ↑ 4.0 3 20,689

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..0.68 rows=12 width=8) (actual time=0.004..0.005 rows=3 loops=20,689)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
10. 0.001 0.001 ↓ 0.0 0 60,898

Index Scan using pk00_tb_geometria on tb_geometria g (cost=0.43..0.48 rows=1 width=48) (actual time=0.001..0.001 rows=0 loops=60,898)

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