explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3vxF

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 78,860.106 ↑ 202.7 3 1

Sort (cost=710,372.27..710,373.79 rows=608 width=72) (actual time=78,860.104..78,860.106 rows=3 loops=1)

  • Sort Key: (count(*))
  • Sort Method: quicksort Memory: 25kB
2. 3.728 78,860.076 ↑ 202.7 3 1

GroupAggregate (cost=710,327.43..710,344.15 rows=608 width=72) (actual time=78,855.345..78,860.076 rows=3 loops=1)

  • Group Key: ("substring"((device_token)::text, 20))
  • Filter: (count(*) > 1)
  • Rows Removed by Filter: 309
3. 13.536 78,856.348 ↓ 7.8 4,768 1

Sort (cost=710,327.43..710,328.95 rows=608 width=47) (actual time=78,855.274..78,856.348 rows=4,768 loops=1)

  • Sort Key: ("substring"((device_token)::text, 20))
  • Sort Method: quicksort Memory: 565kB
4. 78,842.812 78,842.812 ↓ 7.8 4,768 1

Seq Scan on devices (cost=0.00..710,299.32 rows=608 width=47) (actual time=70,002.500..78,842.812 rows=4,768 loops=1)

  • Filter: (((device_type)::text = 'android'::text) AND (created_at >= (now() - '1 day'::interval)))
  • Rows Removed by Filter: 7246361
Planning time : 36.150 ms
Execution time : 78,863.847 ms