explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Frq9

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 13.395 ↑ 1.0 1 1

Subquery Scan on user_statistic (cost=16,528.68..16,528.74 rows=1 width=144) (actual time=13.394..13.395 rows=1 loops=1)

2. 0.064 13.384 ↑ 1.0 1 1

GroupAggregate (cost=16,528.68..16,528.72 rows=1 width=80) (actual time=13.383..13.384 rows=1 loops=1)

  • Group Key: (timezone('MSK'::text, date_trunc('month'::text, timezone('MSK'::text, (user_hourly_statistics.start_time)::timestamp with time zone))))
3. 0.056 13.320 ↓ 29.0 29 1

Sort (cost=16,528.68..16,528.68 rows=1 width=23) (actual time=13.304..13.320 rows=29 loops=1)

  • Sort Key: (timezone('MSK'::text, date_trunc('month'::text, timezone('MSK'::text, (user_hourly_statistics.start_time)::timestamp with time zone))))
  • Sort Method: quicksort Memory: 27kB
4. 0.174 13.264 ↓ 29.0 29 1

Nested Loop (cost=284.95..16,528.67 rows=1 width=23) (actual time=8.794..13.264 rows=29 loops=1)

5. 9.959 11.590 ↓ 250.0 250 1

Bitmap Heap Scan on users (cost=284.51..16,355.34 rows=1 width=4) (actual time=2.397..11.590 rows=250 loops=1)

  • Recheck Cond: ((created_at >= ('2019-12-01 00:00 MSK'::cstring)::timestamp with time zone) AND (created_at <= ('2019-12-01 23:59 MSK'::cstring)::timestamp with time zone))
  • Filter: ((iphone OR ipad) AND ((install_source)::text = 'testbonus'::text))
  • Rows Removed by Filter: 4,581
  • Heap Blocks: exact=4,641
6. 1.631 1.631 ↓ 1.1 4,867 1

Bitmap Index Scan on index_users_on_created_at (cost=0.00..284.51 rows=4,394 width=0) (actual time=1.631..1.631 rows=4,867 loops=1)

  • Index Cond: ((created_at >= ('2019-12-01 00:00 MSK'::cstring)::timestamp with time zone) AND (created_at <= ('2019-12-01 23:59 MSK'::cstring)::timestamp with time zone))
7. 1.500 1.500 ↓ 0.0 0 250

Index Scan using index_user_hourly_statistics_on_user_id on user_hourly_statistics (cost=0.44..173.30 rows=2 width=23) (actual time=0.005..0.006 rows=0 loops=250)

  • Index Cond: (user_id = users.id)
  • Filter: ((start_time >= '2019-12-31 21:00:00'::timestamp without time zone) AND (start_time <= '2020-01-31 20:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 2
Planning time : 32.427 ms
Execution time : 15.024 ms