explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fmn

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 109.747 ↓ 4.0 4 1

sted Loop (cost=160,522.33..160,522.74 rows=1 width=52) (actual time=109.726..109.747 rows=4 loops=1)

  • Join Filter: ((NOT (vw_check_2.check_run_id IS DISTINCT FROM vw_check.check_run_id)) AND (NOT (vw_check_2.price_period_id IS DISTINCT FROM vw_check.price_period_id)) AND (NOT (vw_check_2.rr_mode IS DISTINCT FROM vw_check.rr_mode)))
  • Rows Removed by Join Filter: 12
2. 0.017 75.114 ↓ 4.0 4 1

GroupAggregate (cost=155,893.18..155,893.21 rows=1 width=44) (actual time=75.098..75.114 rows=4 loops=1)

  • Group Key: vw_check.check_run_id, vw_check.price_period_id, vw_check.rr_mode
3. 0.054 75.097 ↓ 57.0 57 1

Sort (cost=155,893.18..155,893.19 rows=1 width=44) (actual time=75.092..75.097 rows=57 loops=1)

  • Sort Key: vw_check.check_run_id, vw_check.price_period_id, vw_check.rr_mode
  • Sort Method: quicksort Memory: 29kB
4. 0.411 75.043 ↓ 57.0 57 1

Nested Loop (cost=9,052.25..155,893.17 rows=1 width=44) (actual time=74.397..75.043 rows=57 loops=1)

  • Join Filter: ((NOT (vw_check.check_run_id IS DISTINCT FROM t2.check_run_id)) AND (NOT (vw_check.date_id IS DISTINCT FROM t2.date_id)) AND (NOT (vw_check.price_period_id IS DISTINCT FROM t2.price_period_id)) AND (NOT (vw_check.rr_mode IS DISTINCT FROM t2.rr_mode)) AND (NOT (vw_check.sales_stage IS DISTINCT FROM t2.sales_stage)) AND (NOT (vw_check.sell_through_target IS DISTINCT FROM t2.sell_through_target)))
  • Rows Removed by Join Filter: 4332
5. 12.410 36.442 ↑ 40.5 57 1

HashAggregate (cost=4,389.41..4,412.52 rows=2,310 width=56) (actual time=36.417..36.442 rows=57 loops=1)

  • Group Key: vw_check.check_run_id, vw_check.date_id, vw_check.price_period_id, vw_check.rr_mode, vw_check.sales_stage, vw_check.sell_through_target
6. 24.032 24.032 ↓ 1.4 33,573 1

Seq Scan on vw_check (cost=0.00..4,029.82 rows=23,973 width=56) (actual time=0.026..24.032 rows=33,573 loops=1)

  • Filter: ((rr_mode >= 'fp'::text) AND (rr_mode <= 'rr2'::text) AND (mru_group = 'ss18_dk_dk_mens_ref'::text) AND (sales_stage = 'in-sales'::text))
  • Rows Removed by Filter: 17068
7. 0.194 38.190 ↑ 30.0 77 57

Materialize (cost=4,662.83..4,720.58 rows=2,310 width=64) (actual time=0.666..0.670 rows=77 loops=57)

8. 0.007 37.996 ↑ 30.0 77 1

Subquery Scan on t2 (cost=4,662.83..4,709.03 rows=2,310 width=64) (actual time=37.965..37.996 rows=77 loops=1)

9. 19.938 37.989 ↑ 30.0 77 1

HashAggregate (cost=4,662.83..4,685.93 rows=2,310 width=64) (actual time=37.964..37.989 rows=77 loops=1)

  • Group Key: vw_check_1.check_run_id, vw_check_1.date_id, vw_check_1.price_period_id, vw_check_1.rr_mode, vw_check_1.sales_stage, vw_check_1.sell_through_target
10. 18.051 18.051 ↑ 1.0 50,641 1

Seq Scan on vw_check vw_check_1 (cost=0.00..3,650.01 rows=50,641 width=68) (actual time=0.008..18.051 rows=50,641 loops=1)

  • Filter: (mru_group = 'ss18_dk_dk_mens_ref'::text)
11. 11.125 34.624 ↑ 2.5 4 4

HashAggregate (cost=4,629.14..4,629.24 rows=10 width=44) (actual time=8.656..8.656 rows=4 loops=4)

  • Group Key: vw_check_2.check_run_id, vw_check_2.price_period_id, vw_check_2.rr_mode
12. 23.499 23.499 ↓ 1.4 33,573 1

Seq Scan on vw_check vw_check_2 (cost=0.00..4,029.82 rows=23,973 width=52) (actual time=0.022..23.499 rows=33,573 loops=1)

  • Filter: ((rr_mode >= 'fp'::text) AND (rr_mode <= 'rr2'::text) AND (mru_group = 'ss18_dk_dk_mens_ref'::text) AND (sales_stage = 'in-sales'::text))
  • Rows Removed by Filter: 17068