explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CKDv

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Insert on prices (cost=4,083.54..231,500.54 rows=13 width=44) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* (cost=4,083.54..231,500.54 rows=13 width=44) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=4,083.54..231,500.35 rows=13 width=36) (actual rows= loops=)

  • Hash Cond: ((new_prices.advert_id = prices_1.advert_id) AND ((SubPlan 2) = prices_1.created))
  • Join Filter: ((new_prices.new_price <> prices_1.price) OR (prices_1.price IS NULL))
4.          

CTE new_prices

5. 0.000 0.000 ↓ 0.0

Values Scan on *VALUES* (cost=0.00..0.16 rows=13 width=36) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

CTE Scan on new_prices (cost=0.00..0.26 rows=13 width=36) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=1,934.15..1,934.15 rows=98,415 width=28) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on prices prices_1 (cost=0.00..1,934.15 rows=98,415 width=28) (actual rows= loops=)

9.          

SubPlan (for Hash Semi Join)

10. 0.000 0.000 ↓ 0.0

Aggregate (cost=2,180.19..2,180.20 rows=1 width=8) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on prices prices_2 (cost=0.00..2,180.19 rows=1 width=8) (actual rows= loops=)

  • Filter: (advert_id = new_prices.advert_id)