explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rbd5

Settings
# exclusive inclusive rows x rows loops node
1. 280.121 765.993 ↑ 6.7 30 1

GroupAggregate (cost=39,992,852.41..41,097,976.91 rows=200 width=16) (actual time=444.187..765.993 rows=30 loops=1)

  • Group Key: (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))
2. 222.916 485.872 ↑ 694.6 212,134 1

Sort (cost=39,992,852.41..40,361,226.57 rows=147,349,667 width=45) (actual time=428.313..485.872 rows=212,134 loops=1)

  • Sort Key: (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))
  • Sort Method: external sort Disk: 11416kB
3. 99.764 262.956 ↑ 694.6 212,134 1

Nested Loop Left Join (cost=0.46..6,403,237.53 rows=147,349,667 width=45) (actual time=0.041..262.956 rows=212,134 loops=1)

4. 0.052 0.052 ↑ 33.3 30 1

Result (cost=0.00..5.03 rows=1,000 width=8) (actual time=0.011..0.052 rows=30 loops=1)

5. 163.140 163.140 ↑ 20.8 7,071 30

Index Scan using idx_javascript_pages_timestamp_conversion on pages (cost=0.46..4,929.72 rows=147,350 width=45) (actual time=0.008..5.438 rows=7,071 loops=30)

  • Index Cond: ((lower(tsrange(timezone('America/Los_Angeles'::text, (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))), (timezone('America/Los_Angeles'::text, (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))) + ('1 day'::cstring)::interval))) < timezone('America/Los_Angeles'::text, "timestamp")) AND (upper(tsrange(timezone('America/Los_Angeles'::text, (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))), (timezone('America/Los_Angeles'::text, (generate_series(date_trunc('day'::text, date_trunc('day'::text, (now() - '29 days'::interval))), now(), ('1 day'::cstring)::interval))) + ('1 day'::cstring)::interval))) > timezone('America/Los_Angeles'::text, "timestamp")))