explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 264b

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 11.812 ↓ 0.0 0 1

Finalize GroupAggregate (cost=17,505.15..17,506.13 rows=8 width=73) (actual time=11.812..11.812 rows=0 loops=1)

  • Group Key: mv_inventory_facts.type, items.category, item_types.id, item_sizes.id, item_colors.id
2. 12.811 15.394 ↓ 0.0 0 1

Gather Merge (cost=17,505.15..17,505.93 rows=6 width=73) (actual time=11.810..15.394 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.018 2.583 ↓ 0.0 0 3

Partial GroupAggregate (cost=16,505.12..16,505.21 rows=3 width=73) (actual time=0.856..0.861 rows=0 loops=3)

  • Group Key: mv_inventory_facts.type, items.category, item_types.id, item_sizes.id, item_colors.id
4. 0.117 2.565 ↓ 0.0 0 3

Sort (cost=16,505.12..16,505.13 rows=3 width=49) (actual time=0.855..0.855 rows=0 loops=3)

  • Sort Key: mv_inventory_facts.type, item_types.id, item_sizes.id, item_colors.id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
5. 0.123 2.448 ↓ 0.0 0 3

Hash Join (cost=41.20..16,505.10 rows=3 width=49) (actual time=0.816..0.816 rows=0 loops=3)

  • Hash Cond: (mv_inventory_facts.item_uom_id = (((items.id)::text || '_'::text) || (uom.id)::text))
6. 0.243 0.243 ↑ 331,161.0 1 3

Parallel Seq Scan on mv_inventory_facts (cost=0.00..12,734.61 rows=331,161 width=23) (actual time=0.081..0.081 rows=1 loops=3)

7. 0.003 2.082 ↓ 0.0 0 3

Hash (cost=41.19..41.19 rows=1 width=48) (actual time=0.694..0.694 rows=0 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
8. 0.000 2.079 ↓ 0.0 0 3

Nested Loop (cost=2.90..41.19 rows=1 width=48) (actual time=0.693..0.693 rows=0 loops=3)

9. 0.000 2.079 ↓ 0.0 0 3

Nested Loop (cost=2.76..41.03 rows=1 width=48) (actual time=0.693..0.693 rows=0 loops=3)

10. 0.003 2.079 ↓ 0.0 0 3

Nested Loop (cost=2.48..40.71 rows=1 width=48) (actual time=0.693..0.693 rows=0 loops=3)

11. 0.000 2.076 ↓ 0.0 0 3

Nested Loop (cost=2.20..40.34 rows=1 width=32) (actual time=0.692..0.692 rows=0 loops=3)

12. 0.021 2.076 ↓ 0.0 0 3

Nested Loop (cost=2.06..40.16 rows=1 width=32) (actual time=0.692..0.692 rows=0 loops=3)

  • Join Filter: (item_variants.type_id = item_types.id)
  • Rows Removed by Join Filter: 42
13. 0.240 0.240 ↑ 1.0 1 3

Seq Scan on item_types (cost=0.00..2.51 rows=1 width=8) (actual time=0.076..0.080 rows=1 loops=3)

  • Filter: ((id)::numeric = 9.0)
  • Rows Removed by Filter: 26
14. 0.513 1.815 ↓ 1.2 42 3

Hash Join (cost=2.06..37.22 rows=34 width=32) (actual time=0.116..0.605 rows=42 loops=3)

  • Hash Cond: (item_variants.size_id = item_sizes.id)
15. 1.146 1.146 ↑ 1.0 1,185 3

Seq Scan on item_variants (cost=0.00..31.86 rows=1,186 width=32) (actual time=0.021..0.382 rows=1,185 loops=3)

16. 0.018 0.156 ↑ 1.0 2 3

Hash (cost=2.04..2.04 rows=2 width=8) (actual time=0.052..0.052 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.138 0.138 ↑ 1.0 2 3

Seq Scan on item_sizes (cost=0.00..2.04 rows=2 width=8) (actual time=0.044..0.046 rows=2 loops=3)

  • Filter: ((id)::numeric = ANY ('{14.0,17.0}'::numeric[]))
  • Rows Removed by Filter: 67
18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using item_colors_pkey on item_colors (cost=0.14..0.18 rows=1 width=8) (never executed)

  • Index Cond: (id = item_variants.color_id)
  • Filter: ((id)::numeric = ANY ('{2.0,12.0,13.0,14.0,15.0,27.0,33.0,35.0,110.0,111.0,112.0,119.0}'::numeric[]))
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using item_units_pkey on item_units iu (cost=0.28..0.34 rows=2 width=16) (never executed)

  • Index Cond: (item_id = item_variants.item_id)
  • Heap Fetches: 0
20. 0.000 0.000 ↓ 0.0 0

Index Scan using inventoryitems_pkey on items (cost=0.28..0.32 rows=1 width=16) (never executed)

  • Index Cond: (id = iu.item_id)
  • Filter: (category = 'Accessories'::text)
21. 0.000 0.000 ↓ 0.0 0

Index Only Scan using uom_pkey on uom (cost=0.14..0.16 rows=1 width=8) (never executed)

  • Index Cond: (id = iu.uom_id)
  • Heap Fetches: 0