explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iOii : Optimization for: plan #AXUv

Settings
# exclusive inclusive rows x rows loops node
1. 0.132 3.535 ↑ 5.9 38 1

HashAggregate (cost=297.53..299.77 rows=224 width=46) (actual time=3.515..3.535 rows=38 loops=1)

  • Group Key: c0_.name, c0_.slug, c0_."left", c0_."right", c0_.level, c0_.id, c0_.root_id, c0_.parent_id
2. 0.097 3.403 ↑ 2.6 86 1

Nested Loop (cost=194.95..293.05 rows=224 width=46) (actual time=1.199..3.403 rows=86 loops=1)

3. 0.033 1.185 ↑ 5.3 21 1

Nested Loop (cost=194.80..244.30 rows=112 width=4) (actual time=1.091..1.185 rows=21 loops=1)

4. 0.063 1.089 ↑ 5.3 21 1

HashAggregate (cost=194.52..195.64 rows=112 width=4) (actual time=1.077..1.089 rows=21 loops=1)

  • Group Key: c2_.id
5. 0.069 1.026 ↓ 1.2 129 1

Nested Loop (cost=0.84..194.24 rows=112 width=4) (actual time=0.076..1.026 rows=129 loops=1)

6. 0.064 0.699 ↓ 1.2 129 1

Nested Loop (cost=0.57..161.00 rows=112 width=4) (actual time=0.062..0.699 rows=129 loops=1)

7. 0.314 0.314 ↑ 1.0 107 1

Index Only Scan using front_category_pkey on front_category f4_ (cost=0.28..84.57 rows=107 width=4) (actual time=0.051..0.314 rows=107 loops=1)

  • Index Cond: (id = ANY ('{3352,3259,4329,3446,2472,2462,3469,1019,2482,32,3334,3243,4303,3432,2458,3433,4305,2459,3467,2486,14899,14812,14638,14551,14377,14290,14116,14029,13855,13768,13594,13507,13333,13246,13072,12985,12811,12724,
  • Heap Fetches: 107
8. 0.321 0.321 ↑ 1.0 1 107

Index Scan using idx_45a669c1596b2477 on front_category_category_match f3_ (cost=0.29..0.70 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=107)

  • Index Cond: (front_category_id = f4_.id)
9. 0.258 0.258 ↑ 1.0 1 129

Index Only Scan using category_pkey on category c2_ (cost=0.28..0.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=129)

  • Index Cond: (id = f3_.category_id)
  • Heap Fetches: 129
10. 0.063 0.063 ↑ 1.0 1 21

Index Scan using category_pkey on category c1_ (cost=0.28..0.42 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (id = c2_.id)
11. 2.121 2.121 ↑ 2.5 4 21

Index Scan using i_category_range_left_right on category c0_ (cost=0.15..0.34 rows=10 width=46) (actual time=0.063..0.101 rows=4 loops=21)

  • Index Cond: (int4range(("left")::integer, ("right")::integer, '[]'::text) @> int4range((c1_."left")::integer, (c1_."right")::integer, '[]'::text))