explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NKta : Optimization for: plan #Qey6

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.119 83.357 ↑ 1.0 1 1

Aggregate (cost=1,446.59..1,446.60 rows=1 width=8) (actual time=83.357..83.357 rows=1 loops=1)

2. 0.372 83.238 ↑ 8.3 1,183 1

Hash Join (cost=533.70..1,422.18 rows=9,765 width=0) (actual time=41.410..83.238 rows=1,183 loops=1)

  • Hash Cond: ((mi.category_id)::text = (c.id)::text)
3. 2.197 78.096 ↑ 8.3 1,183 1

Hash Join (cost=442.50..1,305.29 rows=9,765 width=37) (actual time=36.631..78.096 rows=1,183 loops=1)

  • Hash Cond: ((te.entity_id)::text = (mi.id)::text)
4. 39.298 39.298 ↓ 1.0 9,886 1

Seq Scan on tag_entities te (cost=0.00..837.14 rows=9,765 width=37) (actual time=0.009..39.298 rows=9,886 loops=1)

  • Filter: ((entity_type)::text = 'MENU_ITEM'::text)
  • Rows Removed by Filter: 967
5. 3.665 36.601 ↓ 1.0 6,797 1

Hash (cost=357.78..357.78 rows=6,778 width=74) (actual time=36.600..36.601 rows=6,797 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 768kB
6. 32.936 32.936 ↓ 1.0 6,797 1

Seq Scan on brand_menu_items mi (cost=0.00..357.78 rows=6,778 width=74) (actual time=0.004..32.936 rows=6,797 loops=1)

7. 1.364 4.770 ↑ 1.0 1,900 1

Hash (cost=67.20..67.20 rows=1,920 width=37) (actual time=4.770..4.770 rows=1,900 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 145kB
8. 3.406 3.406 ↑ 1.0 1,900 1

Seq Scan on brand_menu_categories c (cost=0.00..67.20 rows=1,920 width=37) (actual time=0.007..3.406 rows=1,900 loops=1)