explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FyHy

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 65.403 ↑ 1.0 1 1

Limit (cost=62,887.96..62,887.96 rows=1 width=155) (actual time=65.401..65.403 rows=1 loops=1)

2. 0.089 65.400 ↑ 31.0 1 1

Sort (cost=62,887.96..62,888.03 rows=31 width=155) (actual time=65.400..65.400 rows=1 loops=1)

  • Sort Key: discount, created_at
  • Sort Method: top-N heapsort Memory: 25kB
3. 65.311 65.311 ↓ 7.2 224 1

Seq Scan on access_marketplace_instruction (cost=0.00..62,887.80 rows=31 width=155) (actual time=0.084..65.311 rows=224 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())) AND (id <> ALL ('{356213,356224,356190,356189,356166,356203,356001,323501,323851,355742,302554,355748,231075,281807,355465,355718,355791,177770,355437,150405,150529,187929,193836,205657,205658,207472,213469,216571,224670,224671,227079,229003,247593,254398,257042,264437,264438,270060,270061,275033,280987,287142,292845,292846,292847,302201,304705,312986,317326,331708,331709,331710,331711,150349,150354,150557,151496,151952,152005,154061,154062,155584,155585,157182,157183,158235,158236,160005,160006,160007,160008,162443,162444,162445,162446,164313,164314,164315,164316,175234,175235,176796,176797,176798,176799,179374,179375,181203,181204,181205,181206,185594,185595,185596,185597,185598,185599,185600,186974,186975,187948,189285,193996,193997,193998,193999}'::integer[])))
  • Rows Removed by Filter: 355,086
Planning time : 0.151 ms
Execution time : 65.425 ms