explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QQaX

Settings
# exclusive inclusive rows x rows loops node
1. 2.974 167.082 ↑ 419.0 34 1

Unique (cost=30,594.15..30,665.38 rows=14,246 width=44) (actual time=161.506..167.082 rows=34 loops=1)

2. 22.877 164.108 ↓ 3.9 56,234 1

Sort (cost=30,594.15..30,629.77 rows=14,246 width=44) (actual time=161.504..164.108 rows=56,234 loops=1)

  • Sort Key: g.nm_geometria
  • Sort Method: quicksort Memory: 3707kB
3. 10.194 141.231 ↓ 3.9 56,234 1

Gather (cost=1,001.73..29,611.30 rows=14,246 width=44) (actual time=0.444..141.231 rows=56,234 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 32.487 131.037 ↓ 3.4 28,117 2

Nested Loop Left Join (cost=1.73..27,186.70 rows=8,380 width=44) (actual time=0.100..131.037 rows=28,117 loops=2)

5. 64.772 98.549 ↓ 3.4 28,117 2

Nested Loop (cost=1.30..23,138.31 rows=8,380 width=4) (actual time=0.097..98.549 rows=28,117 loops=2)

6. 22.749 33.771 ↓ 2.4 9,765 2

Nested Loop (cost=0.86..19,767.32 rows=4,056 width=4) (actual time=0.087..33.771 rows=9,765 loops=2)

7. 11.017 11.017 ↓ 1.2 3,772 2

Parallel Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd (cost=0.43..11,486.93 rows=3,130 width=4) (actual time=0.077..11.017 rows=3,772 loops=2)

  • Index Cond: (((id_filial)::integer = 47) AND (dt_inicio_terminal >= '2018-01-01 00:00:00'::timestamp without time zone) AND (dt_inicio_terminal <= '2018-12-31 23:59:00'::timestamp without time zone))
  • Filter: ((id_modelo_coleta)::integer = 1)
  • Rows Removed by Filter: 4248
8. 0.005 0.005 ↓ 1.5 3 7,545

Index Scan using ix01f_tb_viagem on tb_viagem v (cost=0.43..2.63 rows=2 width=8) (actual time=0.004..0.005 rows=3 loops=7,545)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
9. 0.006 0.006 ↑ 4.3 3 19,530

Index Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv (cost=0.43..0.70 rows=13 width=8) (actual time=0.004..0.006 rows=3 loops=19,530)

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

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=56,234)

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