explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fmoS

Settings
# exclusive inclusive rows x rows loops node
1. 312.303 33,011.216 ↑ 1.0 14,272 1

Hash Join (cost=496,344.73..499,180.66 rows=14,350 width=2,649) (actual time=350.988..33,011.216 rows=14,272 loops=1)

  • Hash Cond: ((m.master_sku)::text = (maa.master_sku)::text)
2.          

CTE metrics

3. 18,117.596 32,090.661 ↑ 1.0 14,272 1

GroupAggregate (cost=0.57..494,854.61 rows=14,350 width=1,323) (actual time=2.709..32,090.661 rows=14,272 loops=1)

  • Group Key: ma.master_sku
4. 8,213.774 13,973.065 ↑ 1.0 556,608 1

Merge Left Join (cost=0.57..35,214.90 rows=556,608 width=144) (actual time=0.074..13,973.065 rows=556,608 loops=1)

  • Merge Cond: ((ma.master_sku)::text = (am24.master_sku)::text)
5. 5,759.275 5,759.275 ↑ 1.0 556,608 1

Index Scan using aggregation_metric_master_sku_index on aggregation_metrics ma (cost=0.42..33,759.55 rows=556,608 width=84) (actual time=0.040..5,759.275 rows=556,608 loops=1)

6. 0.016 0.016 ↓ 0.0 0 1

Index Scan using aggregation_metric_24_pkey on aggregation_metric_24 am24 (cost=0.14..13.10 rows=130 width=576) (actual time=0.010..0.016 rows=0 loops=1)

7. 32,350.775 32,350.775 ↑ 1.0 14,272 1

CTE Scan on metrics m (cost=0.00..287.00 rows=14,350 width=1,816) (actual time=2.728..32,350.775 rows=14,272 loops=1)

8. 137.434 348.138 ↑ 1.0 14,272 1

Hash (cost=1,311.72..1,311.72 rows=14,272 width=645) (actual time=348.131..348.138 rows=14,272 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 8,932kB
9. 210.704 210.704 ↑ 1.0 14,272 1

Seq Scan on master_aggregation_attributes maa (cost=0.00..1,311.72 rows=14,272 width=645) (actual time=0.015..210.704 rows=14,272 loops=1)

Planning time : 4.779 ms
Execution time : 33,120.495 ms