explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RatE

Settings
# exclusive inclusive rows x rows loops node
1. 4.425 80,911.394 ↓ 296.0 296 1

Sort (cost=4,357,471.96..4,357,471.97 rows=1 width=975) (actual time=80,911.276..80,911.394 rows=296 loops=1)

  • Sort Key: devices.created_at
  • Sort Method: quicksort Memory: 319kB
2. 0.724 80,906.969 ↓ 296.0 296 1

Nested Loop Left Join (cost=0.43..4,357,471.95 rows=1 width=975) (actual time=10,124.694..80,906.969 rows=296 loops=1)

3. 80,903.581 80,903.581 ↓ 296.0 296 1

Seq Scan on devices (cost=0.00..4,357,463.49 rows=1 width=405) (actual time=10,124.642..80,903.581 rows=296 loops=1)

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

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

  • Index Cond: (id = devices.user_id)
Planning time : 68.253 ms
Execution time : 80,919.981 ms