explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Shc5

Settings
# exclusive inclusive rows x rows loops node
1. 4.959 9,736.271 ↑ 22.6 1,889 1

Sort (cost=107,544.41..107,651.30 rows=42,756 width=204) (actual time=9,736.190..9,736.271 rows=1,889 loops=1)

  • Sort Key: ('all'::text), (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
  • Sort Method: quicksort Memory: 338kB
2. 0.413 9,731.312 ↑ 22.6 1,889 1

Append (cost=81,006.76..100,017.15 rows=42,756 width=204) (actual time=9,258.031..9,731.312 rows=1,889 loops=1)

3. 112.817 9,466.259 ↑ 31.6 1,285 1

GroupAggregate (cost=81,006.76..82,531.70 rows=40,665 width=204) (actual time=9,257.752..9,466.259 rows=1,285 loops=1)

  • Group Key: 'all'::text, (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
4. 388.010 9,353.442 ↓ 9.8 399,934 1

Sort (cost=81,006.76..81,108.43 rows=40,665 width=102) (actual time=9,250.741..9,353.442 rows=399,934 loops=1)

  • Sort Key: (((jsonb_each_text(contexts.features))).key), (((jsonb_each_text(contexts.features))).value)
  • Sort Method: external merge Disk: 17760kB
5. 422.690 8,965.432 ↓ 9.8 399,934 1

Gather (cost=27,542.06..75,667.55 rows=40,665 width=102) (actual time=7,195.158..8,965.432 rows=399,934 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 32.660 8,542.742 ↑ 12.7 133,311 3

Result (cost=26,542.06..70,601.05 rows=1,694,400 width=102) (actual time=7,178.962..8,542.742 rows=133,311 loops=3)

7. 106.854 8,510.082 ↑ 12.7 133,311 3

ProjectSet (cost=26,542.06..45,185.05 rows=1,694,400 width=38) (actual time=7,178.957..8,510.082 rows=133,311 loops=3)

8. 1,286.065 8,403.228 ↑ 1.2 13,850 3

Parallel Hash Join (cost=26,542.06..36,585.97 rows=16,944 width=249) (actual time=7,178.915..8,403.228 rows=13,850 loops=3)

  • Hash Cond: (events.guid = contexts.guid)
9. 233.005 233.005 ↑ 1.2 13,850 3

Parallel Seq Scan on events (cost=0.00..6,310.44 rows=16,944 width=44) (actual time=1.890..233.005 rows=13,850 loops=3)

  • Filter: ((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) AND (event = 'install'::text))
  • Rows Removed by Filter: 66842
10. 135.845 6,884.158 ↑ 1.2 71,245 3

Parallel Hash (cost=22,038.25..22,038.25 rows=89,025 width=281) (actual time=6,884.158..6,884.158 rows=71,245 loops=3)

  • Buckets: 16384 Batches: 32 Memory Usage: 2272kB
11. 6,748.313 6,748.313 ↑ 1.2 71,245 3

Parallel Seq Scan on contexts (cost=0.00..22,038.25 rows=89,025 width=281) (actual time=0.476..6,748.313 rows=71,245 loops=3)

12. 10.723 264.640 ↑ 3.5 604 1

GroupAggregate (cost=16,765.70..16,844.11 rows=2,091 width=204) (actual time=253.787..264.640 rows=604 loops=1)

  • Group Key: 'all'::text, (((jsonb_each_text(contexts_1.features))).key), (((jsonb_each_text(contexts_1.features))).value)
13. 22.765 253.917 ↓ 15.1 31,488 1

Sort (cost=16,765.70..16,770.93 rows=2,091 width=102) (actual time=251.618..253.917 rows=31,488 loops=1)

  • Sort Key: (((jsonb_each_text(contexts_1.features))).key), (((jsonb_each_text(contexts_1.features))).value)
  • Sort Method: quicksort Memory: 3249kB
14. 25.751 231.152 ↓ 15.1 31,488 1

Gather (cost=1,111.50..16,650.38 rows=2,091 width=102) (actual time=19.813..231.152 rows=31,488 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
15. 2.753 205.401 ↑ 7.8 15,744 2

Result (cost=111.50..15,441.28 rows=123,000 width=102) (actual time=5.419..205.401 rows=15,744 loops=2)

16. 13.497 202.648 ↑ 7.8 15,744 2

ProjectSet (cost=111.50..13,596.28 rows=123,000 width=38) (actual time=5.307..202.648 rows=15,744 loops=2)

17. 168.603 189.151 ↑ 1.1 1,130 2

Nested Loop (cost=111.50..12,972.06 rows=1,230 width=249) (actual time=4.786..189.151 rows=1,130 loops=2)

18. 14.576 20.400 ↑ 1.1 1,130 2

Parallel Bitmap Heap Scan on events events_1 (cost=111.08..3,815.11 rows=1,230 width=44) (actual time=3.394..20.400 rows=1,130 loops=2)

  • Recheck Cond: ((event = 'trial'::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 Blocks: exact=437
19. 5.824 5.824 ↓ 1.1 2,263 1

Bitmap Index Scan on idx_events_filter (cost=0.00..110.56 rows=2,091 width=0) (actual time=5.824..5.824 rows=2,263 loops=1)

  • Index Cond: ((event = 'trial'::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))
20. 0.148 0.148 ↑ 1.0 1 2,260

Index Scan using contexts_pkey on contexts contexts_1 (cost=0.42..7.44 rows=1 width=281) (actual time=0.148..0.148 rows=1 loops=2,260)

  • Index Cond: (guid = events_1.guid)
Planning time : 1.129 ms
Execution time : 9,761.193 ms