explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R1cE6

Settings
# exclusive inclusive rows x rows loops node
1. 0.071 7,596.302 ↑ 1.0 1 1

Limit (cost=1,114,740.49..1,114,740.50 rows=1 width=8) (actual time=7,596.232..7,596.302 rows=1 loops=1)

2. 40.597 7,596.231 ↑ 1.0 1 1

Aggregate (cost=1,114,740.49..1,114,740.50 rows=1 width=8) (actual time=7,596.231..7,596.231 rows=1 loops=1)

3. 281.326 7,555.634 ↓ 34.6 414,927 1

Nested Loop (cost=1,000.89..1,114,710.50 rows=11,997 width=0) (actual time=7.865..7,555.634 rows=414,927 loops=1)

4. 685.161 6,028.966 ↓ 34.3 415,114 1

Finalize GroupAggregate (cost=1,000.46..1,055,615.73 rows=12,094 width=4) (actual time=7.846..6,028.966 rows=415,114 loops=1)

  • Group Key: pos_items.member_id
  • Filter: (sum(pos_items.value) >= '100'::numeric)
  • Rows Removed by Filter: 42873
5. 170.809 5,343.805 ↓ 6.8 490,328 1

Gather Merge (cost=1,000.46..1,054,527.24 rows=72,566 width=36) (actual time=7.814..5,343.805 rows=490,328 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 2,038.854 5,172.996 ↓ 4.5 163,443 3 / 3

Partial GroupAggregate (cost=0.44..1,045,151.30 rows=36,283 width=36) (actual time=0.133..5,172.996 rows=163,443 loops=3)

  • Group Key: pos_items.member_id
7. 3,134.142 3,134.142 ↑ 1.3 5,821,890 3 / 3

Parallel Index Scan using pos_items_member_id_index on pos_items (cost=0.44..1,008,310.78 rows=7,277,397 width=10) (actual time=0.109..3,134.142 rows=5,821,890 loops=3)

  • Index Cond: (member_id IS NOT NULL)
  • Filter: (community_id = 4)
8. 1,245.342 1,245.342 ↑ 1.0 1 415,114

Index Scan using profiles_member_id_index on profiles (cost=0.42..4.88 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=415,114)

  • Index Cond: (member_id = pos_items.member_id)
  • Filter: (community_id = 4)
Planning time : 0.195 ms
Execution time : 7,596.346 ms