explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tcLL

Settings
# exclusive inclusive rows x rows loops node
1. 0.033 0.582 ↑ 1.0 1 1

Aggregate (cost=43.51..43.52 rows=1 width=8) (actual time=0.563..0.582 rows=1 loops=1)

2. 0.020 0.549 ↓ 0.0 0 1

GroupAggregate (cost=43.44..43.48 rows=2 width=218) (actual time=0.540..0.549 rows=0 loops=1)

  • Group Key: v.id, i.name, cat.name
3. 0.031 0.529 ↓ 0.0 0 1

Sort (cost=43.44..43.45 rows=2 width=124) (actual time=0.520..0.529 rows=0 loops=1)

  • Sort Key: v.id, i.name, cat.name
  • Sort Method: quicksort Memory: 25kB
4. 0.020 0.498 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.50..43.43 rows=2 width=124) (actual time=0.489..0.498 rows=0 loops=1)

5. 0.018 0.478 ↓ 0.0 0 1

Nested Loop Left Join (cost=4.32..30.75 rows=1 width=124) (actual time=0.469..0.478 rows=0 loops=1)

6. 0.097 0.460 ↓ 0.0 0 1

Nested Loop (cost=4.17..22.56 rows=1 width=40) (actual time=0.450..0.460 rows=0 loops=1)

7. 0.079 0.079 ↓ 4.0 4 1

Seq Scan on items i (cost=0.00..11.25 rows=1 width=40) (actual time=0.021..0.079 rows=4 loops=1)

  • Filter: ((type)::text = 'product'::text)
8. 0.220 0.284 ↓ 0.0 0 4

Bitmap Heap Scan on variants v (cost=4.17..11.30 rows=1 width=8) (actual time=0.069..0.071 rows=0 loops=4)

  • Recheck Cond: (item_id = i.id)
  • Filter: ((deleted_at IS NULL) AND (sku ~~* 'PM'::text) AND (factory_id = 1,617))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=1
9. 0.064 0.064 ↓ 0.0 0 4

Bitmap Index Scan on "variants_itemId_idx" (cost=0.00..4.17 rows=3 width=0) (actual time=0.013..0.016 rows=0 loops=4)

  • Index Cond: (item_id = i.id)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using categories_pkey on categories cat (cost=0.15..8.17 rows=1 width=92) (never executed)

  • Index Cond: (id = i.category_id)
11. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on variant_attributes attrib (cost=4.18..12.64 rows=4 width=4) (never executed)

  • Recheck Cond: (v.id = variant_id)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "variant_attributes_variantId_idx" (cost=0.00..4.18 rows=4 width=0) (never executed)

  • Index Cond: (variant_id = v.id)