explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nqeS

Settings
# exclusive inclusive rows x rows loops node
1. 9.429 734.213 ↑ 305.7 39 1

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

2. 75.206 724.784 ↓ 5.1 60,898 1

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

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

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

  • Workers Planned: 1
  • Workers Launched: 1
4. 118.536 575.206 ↓ 4.3 30,449 2

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

5. 281.718 456.668 ↓ 4.3 30,449 2

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

6. 109.034 174.925 ↓ 3.0 10,344 2

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

7. 65.872 65.872 ↓ 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.087..65.872 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.019 0.019 ↑ 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.015..0.019 rows=2 loops=8,541)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
9. 0.025 0.025 ↑ 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.018..0.025 rows=3 loops=20,689)

  • Index Cond: ((id_viagem)::integer = (v.id_viagem)::integer)
10. 0.002 0.002 ↓ 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.002..0.002 rows=0 loops=60,898)

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