explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5YTa

Settings
# exclusive inclusive rows x rows loops node
1. 0.763 1,092.341 ↑ 30.1 1,285 1

Sort (cost=84,413.62..84,510.24 rows=38,649 width=204) (actual time=1,092.286..1,092.341 rows=1,285 loops=1)

  • Sort Key: ('all'::text), (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
  • Sort Method: quicksort Memory: 245kB
2. 99.246 1,091.578 ↑ 30.1 1,285 1

GroupAggregate (cost=75,800.60..77,249.93 rows=38,649 width=204) (actual time=897.950..1,091.578 rows=1,285 loops=1)

  • Group Key: 'all'::text, (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
3. 442.579 992.332 ↓ 10.4 401,044 1

Sort (cost=75,800.60..75,897.22 rows=38,649 width=102) (actual time=896.267..992.332 rows=401,044 loops=1)

  • Sort Key: (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
  • Sort Method: external merge Disk: 18112kB
4. 4.504 549.753 ↓ 10.4 401,044 1

Gather (cost=8,184.13..70,741.90 rows=38,649 width=102) (actual time=115.856..549.753 rows=401,044 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 46.510 545.249 ↑ 12.0 133,681 3

Result (cost=7,184.13..65,877.00 rows=1,610,400 width=102) (actual time=124.616..545.249 rows=133,681 loops=3)

6. 165.612 498.739 ↑ 12.0 133,681 3

ProjectSet (cost=7,184.13..41,721.00 rows=1,610,400 width=38) (actual time=124.613..498.739 rows=133,681 loops=3)

7. 128.595 333.127 ↑ 1.2 13,878 3

Nested Loop (cost=7,184.13..33,548.22 rows=16,104 width=249) (actual time=124.583..333.127 rows=13,878 loops=3)

8. 39.627 204.524 ↑ 1.6 13,878 3

Hash Join (cost=7,183.71..13,223.58 rows=22,306 width=82) (actual time=124.530..204.524 rows=13,878 loops=3)

  • Hash Cond: (events.guid = events_1.guid)
9. 40.732 40.732 ↑ 1.2 71,268 3

Parallel Seq Scan on events (cost=0.00..5,806.31 rows=88,971 width=44) (actual time=0.017..40.732 rows=71,268 loops=3)

  • Filter: (event = 'install'::text)
  • Rows Removed by Filter: 9456
10. 23.833 124.165 ↓ 1.1 41,635 3

Hash (cost=6,700.31..6,700.31 rows=38,672 width=38) (actual time=124.165..124.165 rows=41,635 loops=3)

  • Buckets: 65536 Batches: 1 Memory Usage: 3497kB
11. 42.473 100.332 ↓ 1.1 41,635 3

HashAggregate (cost=5,926.87..6,313.59 rows=38,672 width=38) (actual time=81.980..100.332 rows=41,635 loops=3)

  • Group Key: events_1.guid
12. 57.859 57.859 ↓ 1.0 41,635 3

Index Only Scan using idx_events_filter on events events_1 (cost=0.42..5,825.21 rows=40,665 width=38) (actual time=0.070..57.859 rows=41,635 loops=3)

  • Index Cond: ((event = 'install'::text) AND (date >= '2019-11-18 18:28:13+00'::timestamp with time zone) AND (date < '2019-12-02 18:28:13+00'::timestamp with time zone))
  • Heap Fetches: 112602
13. 0.008 0.008 ↑ 1.0 1 41,635

Index Scan using contexts_pkey on contexts (cost=0.42..0.91 rows=1 width=281) (actual time=0.008..0.008 rows=1 loops=41,635)

  • Index Cond: (guid = events.guid)
Planning time : 1.992 ms
Execution time : 1,096.642 ms