explain.depesz.com

PostgreSQL's explain analyze made readable

Result: loWS

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1,373.483 ↓ 0.0 0 1

Limit (cost=2,425.99..2,425.99 rows=1 width=2,126) (actual time=1,373.482..1,373.483 rows=0 loops=1)

2. 0.039 1,373.480 ↓ 0.0 0 1

Sort (cost=2,425.99..2,425.99 rows=1 width=2,126) (actual time=1,373.479..1,373.480 rows=0 loops=1)

  • Sort Key: m.start_date DESC, m.sort_order, m.title
  • Sort Method: quicksort Memory: 25kB
3. 0.004 1,373.441 ↓ 0.0 0 1

Unique (cost=2,425.96..2,425.97 rows=1 width=2,126) (actual time=1,373.440..1,373.441 rows=0 loops=1)

4. 0.017 1,373.437 ↓ 0.0 0 1

Sort (cost=2,425.96..2,425.97 rows=1 width=2,126) (actual time=1,373.436..1,373.437 rows=0 loops=1)

  • Sort Key: m.sponsor, m.start_date DESC, m.sort_order, m.title
  • Sort Method: quicksort Memory: 25kB
5. 19.841 1,373.420 ↓ 0.0 0 1

Nested Loop (cost=96.26..2,425.95 rows=1 width=2,126) (actual time=1,373.419..1,373.420 rows=0 loops=1)

6. 0.151 0.331 ↓ 32.0 32 1

Hash Join (cost=1.49..2.98 rows=1 width=644) (actual time=0.141..0.331 rows=32 loops=1)

  • Hash Cond: (mt.id = media_resource_type.id)
7. 0.069 0.069 ↑ 1.0 38 1

Seq Scan on media_resource_type mt (cost=0.00..1.38 rows=38 width=640) (actual time=0.011..0.069 rows=38 loops=1)

8. 0.051 0.111 ↓ 32.0 32 1

Hash (cost=1.48..1.48 rows=1 width=4) (actual time=0.110..0.111 rows=32 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.060 0.060 ↓ 32.0 32 1

Seq Scan on media_resource_type (cost=0.00..1.48 rows=1 width=4) (actual time=0.012..0.060 rows=32 loops=1)

  • Filter: (path && '{2}'::integer[])
  • Rows Removed by Filter: 6
10. 1,185.792 1,353.248 ↓ 0.0 0 32

Bitmap Heap Scan on media_resource m (cost=94.78..2,422.96 rows=1 width=1,490) (actual time=42.289..42.289 rows=0 loops=32)

  • Recheck Cond: (resource_type_id = mt.id)
  • Filter: ((status_id = 6) AND (locale_id = 0) AND ((brand_list_perms & 128) > 0) AND (start_date < (CURRENT_TIMESTAMP(0))::timestamp without time zone) AND (((end_date + '1 day'::interval) > (CURRENT_TIMESTAMP(0))::timestamp without time zone) OR (end_date IS NULL)) AND ((media_resource_origin_id = 2) OR (media_resource_origin_id = 3) OR ((media_resource_origin_id = 1) AND (sponsor IS NOT NULL) AND ((sponsor)::text <> ''::text) AND (reg_url IS NOT NULL) AND ((reg_url)::text <> ''::text) AND ((CURRENT_TIMESTAMP(0))::timestamp without time zone >= sponsorship_start_date) AND ((CURRENT_TIMESTAMP(0))::timestamp without time zone <= sponsorship_end_date))))
  • Rows Removed by Filter: 4894
  • Heap Blocks: exact=46190
11. 167.456 167.456 ↓ 1.0 4,894 32

Bitmap Index Scan on test_index_8may (cost=0.00..94.77 rows=4,721 width=0) (actual time=5.233..5.233 rows=4,894 loops=32)

  • Index Cond: (resource_type_id = mt.id)