explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rZmoJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.114 149.581 ↑ 305.8 39 1

Sort (cost=26,389.84..26,419.65 rows=11,925 width=32) (actual time=149.578..149.581 rows=39 loops=1)

  • Sort Key: (("*SELECT* 1".setor)::character varying)
  • Sort Method: quicksort Memory: 26kB
2. 0.096 149.467 ↑ 305.8 39 1

HashAggregate (cost=25,463.16..25,582.41 rows=11,925 width=32) (actual time=149.394..149.467 rows=39 loops=1)

  • Group Key: (("*SELECT* 1".setor)::character varying)
3. 0.008 149.371 ↑ 305.8 39 1

Append (cost=25,191.36..25,433.35 rows=11,925 width=32) (actual time=149.155..149.371 rows=39 loops=1)

4. 0.007 149.241 ↑ 313.8 38 1

Subquery Scan on *SELECT* 1 (cost=25,191.36..25,429.84 rows=11,924 width=32) (actual time=149.154..149.241 rows=38 loops=1)

5. 4.454 149.234 ↑ 313.8 38 1

HashAggregate (cost=25,191.36..25,310.60 rows=11,924 width=44) (actual time=149.152..149.234 rows=38 loops=1)

  • Group Key: g.nm_geometria
6. 11.224 144.780 ↑ 1.0 11,896 1

Gather (cost=1,001.73..25,161.55 rows=11,924 width=44) (actual time=1.260..144.780 rows=11,896 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
7. 29.554 133.556 ↑ 1.2 5,948 2

Nested Loop (cost=1.73..22,969.15 rows=7,014 width=44) (actual time=0.510..133.556 rows=5,948 loops=2)

8. 59.999 104.001 ↓ 4.3 30,449 2

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

9. 22.052 43.997 ↓ 3.0 10,344 2

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

10. 21.941 21.941 ↓ 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.085..21.941 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
11. 0.004 0.004 ↑ 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.004 rows=2 loops=8,541)

  • Index Cond: ((id_rd)::integer = (rd.id_rd)::integer)
12. 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)
13. 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)
14. 0.001 0.122 ↑ 1.0 1 1

Limit (cost=1.30..3.50 rows=1 width=32) (actual time=0.122..0.122 rows=1 loops=1)

15. 0.002 0.121 ↑ 11,924.0 1 1

Nested Loop (cost=1.30..26,301.41 rows=11,924 width=32) (actual time=0.121..0.121 rows=1 loops=1)

16. 0.002 0.103 ↑ 5,773.0 1 1

Nested Loop (cost=0.86..21,842.03 rows=5,773 width=4) (actual time=0.103..0.103 rows=1 loops=1)

17. 0.092 0.092 ↑ 4,460.0 1 1

Index Scan using ind_tb_rd_idfilial_dtini_idveiculo_idrd on tb_rd rd_1 (cost=0.43..9,893.57 rows=4,460 width=4) (actual time=0.092..0.092 rows=1 loops=1)

  • 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: 3
18. 0.009 0.009 ↑ 2.0 1 1

Index Scan using ix01f_tb_viagem on tb_viagem v_1 (cost=0.43..2.66 rows=2 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((id_rd)::integer = (rd_1.id_rd)::integer)
19. 0.016 0.016 ↑ 12.0 1 1

Index Only Scan using ix01f_tb_trecho_viagem on tb_trecho_viagem tv_1 (cost=0.43..0.65 rows=12 width=4) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (id_viagem = (v_1.id_viagem)::integer)
  • Heap Fetches: 0