explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lnPl : Optimization for: Optimization for: Optimization for: plan #Obq7; plan #Ld2K; plan #APM7

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 843.914 1,566.560 ↑ 33.3 6 1

GroupAggregate (cost=257,599.81..257,681.82 rows=200 width=19) (actual time=744.539..1,566.560 rows=6 loops=1)

  • Group Key: events_2019_11_30.type
2. 536.536 722.646 ↓ 32.7 261,362 1

Sort (cost=257,599.81..257,619.81 rows=8,001 width=900) (actual time=607.649..722.646 rows=261,362 loops=1)

  • Sort Key: events_2019_11_30.type
  • Sort Method: external merge Disk: 267568kB
3. 0.000 186.110 ↓ 32.7 261,362 1

Gather (cost=1,000.00..257,081.10 rows=8,001 width=900) (actual time=0.439..186.110 rows=261,362 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 3.920 202.977 ↓ 26.1 52,272 5

Parallel Append (cost=0.00..255,281.00 rows=2,001 width=900) (actual time=0.041..202.977 rows=52,272 loops=5)

5. 0.130 0.132 ↓ 0.0 0 1

Parallel Bitmap Heap Scan on events_2019_11_30 (cost=1.27..3.41 rows=1 width=64) (actual time=0.132..0.132 rows=0 loops=1)

  • Recheck Cond: (("timestamp" >= '2019-11-29 00:00:00+00'::timestamp with time zone) AND ("timestamp" <= '2019-11-30 00:00:00+00'::timestamp with time zone))
  • Filter: (((value ->> 'baseAID'::text) = ANY ('{bandsintown}'::text[])) AND (type = ANY ('{PAGE_LOAD,PAGE_VIEW,TRUE_PAGE_VIEW,INTERACTION,PIN_HOVER,PIN_CLICK}'::text[])))
6. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on events_2019_11_30_timestamp_idx (cost=0.00..1.27 rows=2 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (("timestamp" >= '2019-11-29 00:00:00+00'::timestamp with time zone) AND ("timestamp" <= '2019-11-30 00:00:00+00'::timestamp with time zone))
7. 198.925 198.925 ↓ 26.1 52,272 5

Parallel Seq Scan on events_2019_11_29 (cost=0.00..255,267.59 rows=2,000 width=900) (actual time=0.014..198.925 rows=52,272 loops=5)

  • Filter: (("timestamp" >= '2019-11-29 00:00:00+00'::timestamp with time zone) AND ("timestamp" <= '2019-11-30 00:00:00+00'::timestamp with time zone) AND ((value ->> 'baseAID'::text) = ANY ('{bandsintown}'::text[])) AND (type = ANY ('{PAGE_LOAD,PAGE_VIEW,TRUE_PAGE_VIEW,INTERAC
  • Rows Removed by Filter: 343330
Planning time : 2.244 ms
Execution time : 1,597.385 ms