explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 11vB

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 35.803 89,597.280 ↓ 296.0 296 1

Sort (cost=5,119,482.83..5,119,482.83 rows=1 width=975) (actual time=89,597.162..89,597.280 rows=296 loops=1)

  • Sort Key: devices.created_at
  • Sort Method: quicksort Memory: 319kB
2. 1.122 89,561.477 ↓ 296.0 296 1

Nested Loop Left Join (cost=0.43..5,119,482.82 rows=1 width=975) (actual time=88,866.539..89,561.477 rows=296 loops=1)

3. 89,461.195 89,461.195 ↓ 296.0 296 1

Seq Scan on devices (cost=0.00..5,119,474.35 rows=1 width=405) (actual time=88,859.455..89,461.195 rows=296 loops=1)

  • Filter: (((device_type)::text = 'android'::text) AND (created_at >= (now() - '7 days'::interval)) AND (to_tsvector('english'::regconfig, (device_token)::text) @@ to_tsquery('0000-0000611e4061'::text)))
  • Rows Removed by Filter: 7219984
4. 99.160 99.160 ↑ 1.0 1 296

Index Scan using users_pkey on users (cost=0.43..8.45 rows=1 width=538) (actual time=0.309..0.335 rows=1 loops=296)

  • Index Cond: (id = devices.user_id)
Planning time : 287.147 ms
Execution time : 89,761.779 ms