explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tYwH

Settings
# exclusive inclusive rows x rows loops node
1. 12.707 17,248.368 ↓ 10,504.0 10,504 1

HashAggregate (cost=809,621.43..809,621.45 rows=1 width=98) (actual time=17,242.976..17,248.368 rows=10,504 loops=1)

  • Group Key: s.product_code_
2.          

CTE temp

3. 106.214 4,746.171 ↓ 10,504.0 10,504 1

HashAggregate (cost=335,727.54..335,727.55 rows=1 width=192) (actual time=4,742.231..4,746.171 rows=10,504 loops=1)

  • Group Key: sp_mi_parts_day.product_code_, sp_mi_parts_day.dealer_code_
4. 4,639.957 4,639.957 ↓ 450.1 243,981 1

Foreign Scan on sp_mi_parts_day (cost=0.00..335,723.48 rows=542 width=192) (actual time=1,252.174..4,639.957 rows=243,981 loops=1)

  • Filter: (((dealer_code_)::text = 'UA2201'::text) AND (target_month_ = '201901'::bpchar))
  • Rows Removed by Filter: 21451795
  • CStore File: /var/lib/pgsql/9.4/data/cstore_fdw/16385/50229
  • CStore File Size: 653089939
5. 7,367.398 17,235.661 ↓ 3,501.3 10,504 1

Hash Join (cost=0.04..473,893.86 rows=3 width=98) (actual time=7,614.381..17,235.661 rows=10,504 loops=1)

  • Hash Cond: (((s.product_code_)::text = (t.partsno)::text) AND ((s.dealer_code_)::text = (t.dealercd)::text) AND (s.target_day_ = t.day))
6. 5,115.101 5,115.101 ↑ 1.0 21,695,776 1

Foreign Scan on sp_mi_parts_day s (cost=0.00..229,816.31 rows=21,695,776 width=232) (actual time=3.033..5,115.101 rows=21,695,776 loops=1)

  • CStore File: /var/lib/pgsql/9.4/data/cstore_fdw/16385/50229
  • CStore File Size: 653089939
7. 2.516 4,753.162 ↓ 10,504.0 10,504 1

Hash (cost=0.02..0.02 rows=1 width=188) (actual time=4,753.162..4,753.162 rows=10,504 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 626kB
8. 4,750.646 4,750.646 ↓ 10,504.0 10,504 1

CTE Scan on temp t (cost=0.00..0.02 rows=1 width=188) (actual time=4,742.236..4,750.646 rows=10,504 loops=1)

Planning time : 7.579 ms