explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wqV7 : Optimization for: plan #11vB

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.021 49.529 ↓ 10.1 395 1

Sort (cost=35,779.96..35,780.06 rows=39 width=978) (actual time=49.380..49.529 rows=395 loops=1)

  • Sort Key: devices.created_at
  • Sort Method: quicksort Memory: 418kB
2. 0.537 48.508 ↓ 10.1 395 1

Nested Loop Left Join (cost=232.67..35,778.93 rows=39 width=978) (actual time=17.535..48.508 rows=395 loops=1)

3. 30.918 45.996 ↓ 10.1 395 1

Bitmap Heap Scan on devices (cost=232.24..35,448.89 rows=39 width=405) (actual time=17.508..45.996 rows=395 loops=1)

  • Recheck Cond: (to_tsvector('english'::regconfig, (device_token)::text) @@ to_tsquery('0000-0000611e4061'::text))
  • Filter: (((device_type)::text = 'android'::text) AND (created_at >= (now() - '7 days'::interval)))
  • Rows Removed by Filter: 15327
  • Heap Blocks: exact=11387
4. 15.078 15.078 ↓ 1.9 15,826 1

Bitmap Index Scan on index_devices_on_device_token_gin (cost=0.00..232.23 rows=8,530 width=0) (actual time=15.077..15.078 rows=15,826 loops=1)

  • Index Cond: (to_tsvector('english'::regconfig, (device_token)::text) @@ to_tsquery('0000-0000611e4061'::text))
5. 1.975 1.975 ↑ 1.0 1 395

Index Scan using users_pkey on users (cost=0.43..8.45 rows=1 width=541) (actual time=0.004..0.005 rows=1 loops=395)

  • Index Cond: (id = devices.user_id)
Planning time : 1.050 ms
Execution time : 49.728 ms