explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bnl1

Settings
# exclusive inclusive rows x rows loops node
1. 3.020 346.683 ↓ 22,528.0 22,528 1

Subquery Scan on view_repetida_02 (cost=17,350.57..17,360.26 rows=1 width=598) (actual time=311.134..346.683 rows=22,528 loops=1)

  • Filter: (view_repetida_02."Flag_Reinc" = 1)
  • Rows Removed by Filter: 8497
2. 24.454 343.663 ↓ 112.0 31,025 1

WindowAgg (cost=17,350.57..17,356.80 rows=277 width=598) (actual time=311.131..343.663 rows=31,025 loops=1)

3. 215.987 319.209 ↓ 112.0 31,025 1

Sort (cost=17,350.57..17,351.26 rows=277 width=574) (actual time=311.115..319.209 rows=31,025 loops=1)

  • Sort Key: t1."ID_Ticket", t2."Data_Criacao
  • Sort Method: external sort Disk: 15760kB
4. 0.000 103.222 ↓ 112.0 31,025 1

Gather (cost=8,631.79..17,339.33 rows=277 width=574) (actual time=65.591..103.222 rows=31,025 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 36.151 111.808 ↓ 89.9 10,342 3 / 3

Hash Join (cost=7,631.79..16,311.63 rows=115 width=574) (actual time=71.129..111.808 rows=10,342 loops=3)

  • Hash Cond: ((t1."ServiceID")::text = (t2."ServiceID")::text)
  • Join Filter: (((t1."ID_Ticket")::text <> (t2."ID_Ticket")::text) AND (t2."Data_Criacao" >= t1."Data_Criacao") AND (CASE WHEN ((date_part('epoch'::text, (t2."Data_Criacao" - t1."Data_Criacao")) / '60'::double precision) <= '43200'::double precision) THEN 'Sim'::text ELSE 'Não'::text END = 'Sim'::text))
  • Rows Removed by Join Filter: 47317
6. 4.946 4.946 ↑ 1.2 33,745 3 / 3

Parallel Seq Scan on tb_xtts_abertas t1 (cost=0.00..5,775.81 rows=42,181 width=439) (actual time=0.006..4.946 rows=33,745 loops=3)

7. 31.186 70.711 ↑ 1.0 101,235 3 / 3

Hash (cost=6,366.35..6,366.35 rows=101,235 width=145) (actual time=70.711..70.711 rows=101,235 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 15720kB
8. 39.525 39.525 ↑ 1.0 101,235 3 / 3

Seq Scan on tb_xtts_abertas t2 (cost=0.00..6,366.35 rows=101,235 width=145) (actual time=0.007..39.525 rows=101,235 loops=3)

Planning time : 0.501 ms
Execution time : 350.575 ms