explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m02N

Settings
# exclusive inclusive rows x rows loops node
1. 0.109 150.789 ↑ 305.8 39 1

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

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

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

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

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

4. 0.007 150.441 ↑ 313.8 38 1

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

5. 4.455 150.434 ↑ 313.8 38 1

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

  • Group Key: g.nm_geometria
6. 11.051 145.979 ↑ 1.0 11,896 1

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

  • Workers Planned: 1
  • Workers Launched: 1
7. 30.017 134.928 ↑ 1.2 5,948 2

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

8. 59.898 104.910 ↓ 4.3 30,449 2

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

9. 22.813 45.007 ↓ 3.0 10,344 2

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

10. 22.189 22.189 ↓ 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.081..22.189 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.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)
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.002 0.112 ↑ 1.0 1 1

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

15. 0.002 0.110 ↑ 11,924.0 1 1

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

16. 0.002 0.095 ↑ 5,773.0 1 1

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

17. 0.084 0.084 ↑ 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.084..0.084 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.013 0.013 ↑ 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.013..0.013 rows=1 loops=1)

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