explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VTv

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 65.003 ↑ 1.0 1 1

Limit (cost=15,812.81..15,812.82 rows=1 width=155) (actual time=65.002..65.003 rows=1 loops=1)

2. 0.113 65.001 ↑ 31.0 1 1

Sort (cost=15,812.81..15,812.89 rows=31 width=155) (actual time=65.000..65.001 rows=1 loops=1)

  • Sort Key: access_marketplace_instruction.discount, access_marketplace_instruction.created_at
  • Sort Method: top-N heapsort Memory: 25kB
3. 0.102 64.888 ↓ 10.5 324 1

Nested Loop Semi Join (cost=0.00..15,812.66 rows=31 width=155) (actual time=0.086..64.888 rows=324 loops=1)

  • Join Filter: (""*VALUES*"".column1 <> access_marketplace_instruction.id)
4. 64.786 64.786 ↓ 10.5 324 1

Seq Scan on access_marketplace_instruction (cost=0.00..15,809.89 rows=31 width=155) (actual time=0.082..64.786 rows=324 loops=1)

  • Filter: ((NOT is_selling) AND (target_remaining > '0'::numeric) AND (discount > '0'::numeric) AND (user_id <> 26227) AND (discount <= '99'::numeric) AND (status = 'live'::text) AND ((expires_at IS NULL) OR (expires_at >= now())))
  • Rows Removed by Filter: 354,986
5. 0.000 0.000 ↑ 106.0 1 324

Materialize (cost=0.00..1.86 rows=106 width=4) (actual time=0.000..0.000 rows=1 loops=324)

6. 0.001 0.001 ↑ 106.0 1 1

Values Scan on ""*VALUES*"" (cost=0.00..1.33 rows=106 width=4) (actual time=0.001..0.001 rows=1 loops=1)

Planning time : 0.190 ms
Execution time : 65.034 ms