explain.depesz.com

PostgreSQL's explain analyze made readable

Result: If38

Settings
# exclusive inclusive rows x rows loops node
1. 0.086 139.627 ↑ 419.0 34 1

Sort (cost=31,270.96..31,306.58 rows=14,247 width=33) (actual time=139.625..139.627 rows=34 loops=1)

  • Sort Key: (((q.setor)::text = '[SETOR DESCONHECIDO]'::text)), q.setor
  • Sort Method: quicksort Memory: 27kB
2. 0.008 139.541 ↑ 419.0 34 1

Subquery Scan on q (cost=29,967.48..30,288.03 rows=14,247 width=33) (actual time=139.464..139.541 rows=34 loops=1)

3. 0.093 139.533 ↑ 419.0 34 1

HashAggregate (cost=29,967.48..30,109.95 rows=14,247 width=32) (actual time=139.463..139.533 rows=34 loops=1)

  • Group Key: (("*SELECT* 1".setor)::character varying)
4. 0.004 139.440 ↑ 419.0 34 1

Append (cost=29,646.92..29,931.86 rows=14,247 width=32) (actual time=139.356..139.440 rows=34 loops=1)

5. 0.006 139.435 ↑ 431.7 33 1

Subquery Scan on *SELECT* 1 (cost=29,646.92..29,931.84 rows=14,246 width=32) (actual time=139.355..139.435 rows=33 loops=1)

6. 5.055 139.429 ↑ 431.7 33 1

HashAggregate (cost=29,646.92..29,789.38 rows=14,246 width=44) (actual time=139.354..139.429 rows=33 loops=1)

  • Group Key: g.nm_geometria
7. 5.151 134.374 ↑ 1.2 12,297 1

Gather (cost=1,001.73..29,611.30 rows=14,246 width=44) (actual time=0.506..134.374 rows=12,297 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
8. 29.776 129.223 ↑ 1.4 6,148 2

Nested Loop (cost=1.73..27,186.70 rows=8,380 width=44) (actual time=0.125..129.223 rows=6,148 loops=2)

9. 65.530 99.446 ↓ 3.4 28,117 2

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

10. 23.027 33.910 ↓ 2.4 9,765 2

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

11. 10.878 10.878 ↓ 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..10.878 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
12. 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)
13. 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)
14. 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)
15. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=1)