explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AY5s

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 21.070 ↑ 1.0 10 1

Limit (cost=158,275.77..158,275.87 rows=10 width=1,444) (actual time=21.063..21.070 rows=10 loops=1)

2. 0.008 21.069 ↑ 7,030.6 10 1

Group (cost=158,275.77..158,978.83 rows=70,306 width=1,444) (actual time=21.063..21.069 rows=10 loops=1)

  • Group Key: term.id, category.value, category.category_type
3. 1.801 21.061 ↑ 7,030.6 10 1

Sort (cost=158,275.77..158,451.54 rows=70,306 width=1,444) (actual time=21.060..21.061 rows=10 loops=1)

  • Sort Key: term.id, category.value, category.category_type
  • Sort Method: quicksort Memory: 1642kB
4. 1.772 19.260 ↑ 23.4 3,006 1

Hash Left Join (cost=12.42..108,396.66 rows=70,306 width=1,444) (actual time=3.152..19.260 rows=3,006 loops=1)

  • Hash Cond: (term.category_id = category.id)
5. 0.623 17.125 ↑ 23.4 3,006 1

Nested Loop Left Join (cost=0.85..107,418.38 rows=70,306 width=420) (actual time=2.771..17.125 rows=3,006 loops=1)

6. 0.710 13.502 ↑ 23.4 3,000 1

Nested Loop (cost=0.42..38,734.03 rows=70,306 width=428) (actual time=1.462..13.502 rows=3,000 loops=1)

7. 0.062 0.062 ↑ 1.0 134 1

Values Scan on "*VALUES*" (cost=0.00..1.68 rows=134 width=32) (actual time=0.002..0.062 rows=134 loops=1)

8. 12.730 12.730 ↑ 23.9 22 134

Index Scan using ll_terms_title_id on ll_terms term (cost=0.42..283.80 rows=525 width=438) (actual time=0.058..0.095 rows=22 loops=134)

  • Index Cond: ((title_id)::text = "*VALUES*".column1)
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 0
9. 3.000 3.000 ↓ 0.0 0 3,000

Index Scan using ll_terms_aka_group_id on ll_terms aka_term (cost=0.42..0.97 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=3,000)

  • Index Cond: (term.aka_group_id = aka_group_id)
  • Filter: ((NOT deleted) AND (term.id <> id))
  • Rows Removed by Filter: 0
10. 0.010 0.363 ↑ 5.0 14 1

Hash (cost=10.70..10.70 rows=70 width=1,040) (actual time=0.363..0.363 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.353 0.353 ↑ 5.0 14 1

Seq Scan on ll_categories category (cost=0.00..10.70 rows=70 width=1,040) (actual time=0.349..0.353 rows=14 loops=1)