explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ieZ3

Settings

Optimization(s) for this plan:

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

Limit (cost=15,877.20..15,877.20 rows=1 width=155) (actual time=79.686..79.687 rows=1 loops=1)

2. 9.225 79.685 ↑ 3,286.0 1 1

Sort (cost=15,877.20..15,885.41 rows=3,286 width=155) (actual time=79.684..79.685 rows=1 loops=1)

  • Sort Key: access_marketplace_instruction.discount, access_marketplace_instruction.created_at
  • Sort Method: top-N heapsort Memory: 25kB
3. 4.528 70.460 ↓ 10.4 34,244 1

Nested Loop Left Join (cost=0.00..15,860.77 rows=3,286 width=155) (actual time=0.086..70.460 rows=34,244 loops=1)

  • Join Filter: (access_marketplace_instruction.id <> ""*VALUES*"".column1)
  • Rows Removed by Join Filter: 100
4. 64.636 64.636 ↓ 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.636 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. 1.278 1.296 ↑ 1.0 106 324

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

6. 0.018 0.018 ↑ 1.0 106 1

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

Planning time : 0.171 ms
Execution time : 79.717 ms