explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Vnh

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.006 0.098 ↑ 53.5 2 1

Subquery Scan on foo (cost=88.41..4276.12 rows=107 width=12) (actual time=0.083..0.098 rows=2 loops=1)

2. 0.008 0.058 ↑ 53.5 2 1

HashAggregate (cost=88.41..89.48 rows=107 width=8) (actual time=0.058..0.058 rows=2 loops=1)

3. 0.005 0.050 ↑ 35.7 3 1

Nested Loop (cost=15.01..87.87 rows=107 width=8) (actual time=0.039..0.050 rows=3 loops=1)

4. 0.008 0.036 ↑ 35.7 3 1

Hash Join (cost=15.01..55.50 rows=107 width=8) (actual time=0.032..0.036 rows=3 loops=1)

  • Hash Cond: (badgegroups_to_topiccategories.category_id = user_topiccategories_counters.category_id)
5. 0.010 0.010 ↑ 713.3 3 1

Seq Scan on badgegroups_to_topiccategories (cost=0.00..31.40 rows=2140 width=8) (actual time=0.007..0.010 rows=3 loops=1)

6. 0.004 0.018 ↑ 3.3 3 1

Hash (cost=14.88..14.88 rows=10 width=8) (actual time=0.018..0.018 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
7. 0.006 0.014 ↑ 3.3 3 1

Bitmap Heap Scan on user_topiccategories_counters (cost=4.33..14.88 rows=10 width=8) (actual time=0.012..0.014 rows=3 loops=1)

  • Recheck Cond: (user_id = 500000)
8. 0.008 0.008 ↑ 3.3 3 1

Bitmap Index Scan on counters_pkey (cost=0.00..4.33 rows=10 width=0) (actual time=0.008..0.008 rows=3 loops=1)

  • Index Cond: (user_id = 500000)
9. 0.009 0.009 ↑ 1.0 1 3

Index Scan using badgegroups_pkey on badgegroups (cost=0.00..0.29 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=3)

  • Index Cond: (badgegroup_id = badgegroups_to_topiccategories.badgegroup_id)
10.          

SubPlan (forSubquery Scan on foo)

11. 0.004 0.034 ↑ 1.0 1 2

Limit (cost=39.11..39.12 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=2)

12. 0.020 0.030 ↑ 3.0 1 2

Sort (cost=39.11..39.12 rows=3 width=8) (actual time=0.015..0.015 rows=1 loops=2)

  • Sort Key: badges.points
  • Sort Method: quicksort Memory: 25kB
13. 0.010 0.010 ↑ 1.5 2 2

Seq Scan on badges (cost=0.00..39.10 rows=3 width=8) (actual time=0.005..0.005 rows=2 loops=2)

  • Filter: ((points < foo.sum) AND (badgegroup_id = foo.badgegroup_id))