explain.depesz.com

A tool for finding a real cause for slow queries.

Result: ndi

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

Subquery Scan on foo (cost=88.41..4,276.12 rows=107 width=12) (actual time=0.056..0.064 rows=2 loops=1)

2. 0.005 0.040 ↑ 53.5 2 1

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

3. 0.005 0.035 ↑ 35.7 3 1

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

4. 0.010 0.027 ↑ 35.7 3 1

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

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

Seq Scan on badgegroups_to_topiccategories (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.003..0.005 rows=3 loops=1)

6. 0.003 0.012 ↑ 3.3 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
7. 0.003 0.009 ↑ 3.3 3 1

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

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

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

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

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

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

SubPlan (forSubquery Scan on foo)

11. 0.000 0.018 ↑ 1.0 1 2

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

12. 0.010 0.018 ↑ 3.0 1 2

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

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

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

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