explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HCvZ : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #fh1o; plan #deTh; plan #7vTb; plan #I063; plan #DcAv

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 57.358 3,123.316 ↓ 7.3 111,607 1

Hash Left Join (cost=203,046.90..569,826.06 rows=15,386 width=222) (actual time=1,151.102..3,123.316 rows=111,607 loops=1)

  • Hash Cond: ((widgets.widget_id)::text = (ps.widget_id)::text)
2. 85.507 3,065.842 ↓ 7.3 111,607 1

Nested Loop (cost=203,042.16..569,515.91 rows=15,386 width=159) (actual time=1,150.970..3,065.842 rows=111,607 loops=1)

3. 240.129 1,417.837 ↓ 1.2 111,607 1

GroupAggregate (cost=203,041.73..218,015.04 rows=96,332 width=158) (actual time=1,150.856..1,417.837 rows=111,607 loops=1)

  • Group Key: widgets.widget_id, widgets.imb_id, widgets.source_id, widgets.ts_id
4. 855.239 1,177.708 ↓ 1.2 111,607 1

Sort (cost=203,041.73..203,283.91 rows=96,872 width=53) (actual time=1,150.809..1,177.708 rows=111,607 loops=1)

  • Sort Key: widgets.widget_id, widgets.imb_id, widgets.source_id, widgets.ts_id
  • Sort Method: external sort Disk: 5912kB
5. 322.469 322.469 ↓ 1.2 111,607 1

Index Scan using widgets_pkey on widgets (cost=0.57..191,704.39 rows=96,872 width=53) (actual time=0.160..322.469 rows=111,607 loops=1)

  • Index Cond: (date = (now())::date)
  • Filter: ((ts_id IS NOT NULL) AND (date <> '2018-07-18'::date))
  • Rows Removed by Filter: 113
6. 1,562.498 1,562.498 ↑ 1.0 1 111,607

Index Scan using widget_status_pkey on widget_status (cost=0.43..3.63 rows=1 width=10) (actual time=0.012..0.014 rows=1 loops=111,607)

  • Index Cond: (((widget_id)::text = (widgets.widget_id)::text) AND (ts_id = widgets.ts_id))
7. 0.041 0.116 ↑ 1.0 122 1

Hash (cost=3.22..3.22 rows=122 width=548) (actual time=0.116..0.116 rows=122 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
8. 0.075 0.075 ↑ 1.0 122 1

Seq Scan on widgets_profit_status ps (cost=0.00..3.22 rows=122 width=548) (actual time=0.039..0.075 rows=122 loops=1)

Planning time : 40.685 ms
Execution time : 3,135.898 ms