explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ja7A

Settings
# exclusive inclusive rows x rows loops node
1. 228.350 228.350 ↓ 1,000.0 1,000 1

CTE Scan on certificates (cost=145,329.76..145,329.78 rows=1 width=328) (actual time=227.400..228.350 rows=1,000 loops=1)

2.          

CTE certificates

3. 0.000 227.980 ↓ 1,000.0 1,000 1

Limit (cost=145,322.05..145,329.76 rows=1 width=116) (actual time=227.397..227.980 rows=1,000 loops=1)

4. 22.686 229.650 ↓ 6.1 91,000 1

Gather (cost=29,424.07..145,322.05 rows=15,015 width=116) (actual time=126.126..229.650 rows=91,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 65.053 206.964 ↓ 4.8 30,336 3 / 3

Parallel Hash Join (cost=28,424.07..142,820.55 rows=6,256 width=116) (actual time=122.819..206.964 rows=30,336 loops=3)

  • Hash Cond: ((tb_dist_certificate_daily.id_customer = tb_dist_certificate.id_customer) AND (tb_dist_certificate_daily.id_instrument = tb_dist_certificate.id_instrument) AND (tb_dist_certificate_daily.id_certificate = tb_dist_certificate.id_certificate))
6. 19.999 19.999 ↑ 1.4 74,440 3 / 3

Parallel Index Scan using tb_dist_certificate_daily_id_contract_dt_reference_idx on tb_dist_certificate_daily (cost=0.57..113,488.33 rows=105,462 width=78) (actual time=0.021..19.999 rows=74,440 loops=3)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,601))
7. 33.561 121.912 ↑ 1.3 83,182 3 / 3

Parallel Hash (cost=26,599.46..26,599.46 rows=104,231 width=42) (actual time=121.912..121.912 rows=83,182 loops=3)

  • Buckets: 262,144 Batches: 1 Memory Usage: 21,792kB
8. 88.351 88.351 ↑ 1.3 83,182 3 / 3

Parallel Seq Scan on tb_dist_certificate (cost=0.00..26,599.46 rows=104,231 width=42) (actual time=0.008..88.351 rows=83,182 loops=3)

  • Filter: ((NOT is_from_minicom) AND (id_contract = 8))
  • Rows Removed by Filter: 362,352