explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k8ys

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 9,724.621 344,819.340 ↑ 5.9 592,088 1

Gather (cost=1,295,376.72..4,584,842.61 rows=3,498,302 width=281) (actual time=241,899.352..344,819.340 rows=592,088 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 88,638.337 335,094.719 ↑ 7.4 118,418 5 / 5

Hash Join (cost=1,294,376.72..4,148,741.31 rows=874,576 width=281) (actual time=171,482.683..335,094.719 rows=118,418 loops=5)

  • Hash Cond: (bcr.id = tkts.tem_registro_consumo_id)
  • Join Filter: (CASE WHEN (tkts.last_update > bcr.last_update) THEN tkts.last_update ELSE bcr.last_update END >= to_timestamp('20200106'::text, 'YYYYMMDD'::text))
  • Rows Removed by Join Filter: 5779064
3. 135,051.864 135,051.864 ↑ 1.2 5,897,482 5 / 5

Parallel Seq Scan on tem_registro_consumo bcr (cost=0.00..2,010,436.35 rows=7,310,253 width=101) (actual time=0.268..135,051.864 rows=5,897,482 loops=5)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 10451981
4. 35,068.900 111,404.518 ↓ 1.0 29,487,408 5 / 5

Hash (cost=669,756.08..669,756.08 rows=29,339,971 width=47) (actual time=111,404.517..111,404.518 rows=29,487,408 loops=5)

  • Buckets: 524288 Batches: 128 Memory Usage: 21890kB
5. 76,335.618 76,335.618 ↓ 1.0 29,487,408 5 / 5

Seq Scan on bill_tickets tkts (cost=0.00..669,756.08 rows=29,339,971 width=47) (actual time=0.129..76,335.618 rows=29,487,408 loops=5)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) IS NOT NULL)
Planning time : 37.201 ms
Execution time : 344,897.602 ms