explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rlgq

Settings
# exclusive inclusive rows x rows loops node
1. 1.217 1.515 ↓ 0.0 0 1

Insert on prices (cost=0.58..96.36 rows=13 width=44) (actual time=1.515..1.515 rows=0 loops=1)

2. 0.005 0.298 ↑ 6.5 2 1

Subquery Scan on *SELECT* (cost=0.58..96.36 rows=13 width=44) (actual time=0.083..0.298 rows=2 loops=1)

3. 0.003 0.293 ↑ 6.5 2 1

Nested Loop Semi Join (cost=0.58..96.17 rows=13 width=36) (actual time=0.080..0.293 rows=2 loops=1)

4.          

CTE new_prices

5. 0.010 0.010 ↑ 1.0 13 1

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

6. 0.017 0.017 ↑ 1.0 13 1

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

7. 0.273 0.273 ↓ 0.0 0 13

Index Scan using prices_advert_id_created on prices prices_1 (cost=0.42..8.44 rows=1 width=20) (actual time=0.021..0.021 rows=0 loops=13)

  • Index Cond: (advert_id = new_prices.advert_id)
  • Filter: ((new_prices.new_price <> price) OR (price IS NULL))
  • Rows Removed by Filter: 3
Planning time : 0.139 ms
Execution time : 1.547 ms