explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Poxd

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 3.214 ↑ 1.0 5 1

Limit (cost=1,430.21..1,430.22 rows=5 width=92) (actual time=3.209..3.214 rows=5 loops=1)

  • Output: product_variant.title, inventory_item.product_variant_id, brand.title, category.title, (min(inventory_item.price)), (max(inventory_item.price)), product.showcase_order, product_variant.id, brand.id, category.id, product.id
  • Buffers: shared hit=907
2. 0.039 3.209 ↑ 30.4 5 1

Sort (cost=1,430.21..1,430.59 rows=152 width=92) (actual time=3.208..3.209 rows=5 loops=1)

  • Output: product_variant.title, inventory_item.product_variant_id, brand.title, category.title, (min(inventory_item.price)), (max(inventory_item.price)), product.showcase_order, product_variant.id, brand.id, category.id, product.id
  • Sort Key: product.showcase_order
  • Sort Method: top-N heapsort Memory: 26kB
  • Buffers: shared hit=907
3. 0.041 3.170 ↑ 2.5 60 1

GroupAggregate (cost=1,423.13..1,427.69 rows=152 width=92) (actual time=3.127..3.170 rows=60 loops=1)

  • Output: product_variant.title, inventory_item.product_variant_id, brand.title, category.title, min(inventory_item.price), max(inventory_item.price), product.showcase_order, product_variant.id, brand.id, category.id, product.id
  • Group Key: inventory_item.product_variant_id, product_variant.id, brand.id, category.id, product.id
  • Buffers: shared hit=907
4. 0.049 3.129 ↑ 2.5 60 1

Sort (cost=1,423.13..1,423.51 rows=152 width=84) (actual time=3.124..3.129 rows=60 loops=1)

  • Output: inventory_item.product_variant_id, product_variant.id, brand.id, category.id, product.id, product_variant.title, brand.title, category.title, inventory_item.price, product.showcase_order
  • Sort Key: inventory_item.product_variant_id, brand.id, category.id, product.id
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=907
5. 0.047 3.080 ↑ 2.5 60 1

Hash Join (cost=1,275.30..1,417.62 rows=152 width=84) (actual time=1.842..3.080 rows=60 loops=1)

  • Output: inventory_item.product_variant_id, product_variant.id, brand.id, category.id, product.id, product_variant.title, brand.title, category.title, inventory_item.price, product.showcase_order
  • Inner Unique: true
  • Hash Cond: (product.brand_id = brand.id)
  • Buffers: shared hit=907
6. 0.066 3.012 ↓ 1.1 174 1

Hash Join (cost=1,273.74..1,415.63 rows=152 width=75) (actual time=1.778..3.012 rows=174 loops=1)

  • Output: inventory_item.product_variant_id, inventory_item.price, product_variant.title, product_variant.id, product.showcase_order, product.id, product.brand_id, category.title, category.id
  • Inner Unique: true
  • Hash Cond: (product_category.category_id = category.id)
  • Buffers: shared hit=906
7. 0.200 2.938 ↓ 1.1 174 1

Nested Loop (cost=1,272.60..1,413.82 rows=152 width=66) (actual time=1.765..2.938 rows=174 loops=1)

  • Output: inventory_item.product_variant_id, inventory_item.price, product_variant.title, product_variant.id, product.showcase_order, product.id, product.brand_id, product_category.category_id
  • Inner Unique: true
  • Join Filter: (product_variant.product_id = product.id)
  • Buffers: shared hit=905
8. 0.374 2.390 ↑ 1.3 174 1

Hash Join (cost=1,272.32..1,318.64 rows=219 width=62) (actual time=1.750..2.390 rows=174 loops=1)

  • Output: inventory_item.product_variant_id, inventory_item.price, product_variant.title, product_variant.id, product_variant.product_id, product_category.product_id, product_category.category_id
  • Hash Cond: (product_category.product_id = product_variant.product_id)
  • Buffers: shared hit=383
9. 0.288 0.288 ↑ 1.0 2,058 1

Seq Scan on public.product_category (cost=0.00..36.18 rows=2,118 width=8) (actual time=0.006..0.288 rows=2,058 loops=1)

  • Output: product_category.created_date, product_category.updated_date, product_category.id, product_category.product_id, product_category.category_id, product_category."order
  • Buffers: shared hit=15
10. 0.065 1.728 ↑ 1.3 174 1

Hash (cost=1,269.59..1,269.59 rows=219 width=54) (actual time=1.728..1.728 rows=174 loops=1)

  • Output: inventory_item.product_variant_id, inventory_item.price, product_variant.title, product_variant.id, product_variant.product_id
  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=368
11. 0.075 1.663 ↑ 1.3 174 1

Hash Join (cost=74.26..1,269.59 rows=219 width=54) (actual time=0.947..1.663 rows=174 loops=1)

  • Output: inventory_item.product_variant_id, inventory_item.price, product_variant.title, product_variant.id, product_variant.product_id
  • Inner Unique: true
  • Hash Cond: (inventory_item.product_variant_id = product_variant.id)
  • Buffers: shared hit=368
12. 0.698 0.813 ↑ 1.3 174 1

Bitmap Heap Scan on public.inventory_item (cost=26.00..1,220.75 rows=219 width=12) (actual time=0.163..0.813 rows=174 loops=1)

  • Output: inventory_item.created_date, inventory_item.updated_date, inventory_item.id, inventory_item.poc_id, inventory_item.product_variant_id, inventory_item.quantity, inventory_item.price, inventory_item.published_date, inventory_item.available_date
  • Recheck Cond: (inventory_item.poc_id = 21)
  • Filter: ((inventory_item.available_date IS NOT NULL) AND (inventory_item.price > '0'::double precision))
  • Rows Removed by Filter: 527
  • Heap Blocks: exact=337
  • Buffers: shared hit=346
13. 0.115 0.115 ↓ 1.1 811 1

Bitmap Index Scan on poc_product_variant (cost=0.00..25.95 rows=737 width=0) (actual time=0.115..0.115 rows=811 loops=1)

  • Index Cond: (inventory_item.poc_id = 21)
  • Buffers: shared hit=9
14. 0.386 0.775 ↓ 1.0 1,176 1

Hash (cost=33.67..33.67 rows=1,167 width=42) (actual time=0.775..0.775 rows=1,176 loops=1)

  • Output: product_variant.title, product_variant.id, product_variant.product_id
  • Buckets: 2048 Batches: 1 Memory Usage: 104kB
  • Buffers: shared hit=22
15. 0.389 0.389 ↓ 1.0 1,176 1

Seq Scan on public.product_variant (cost=0.00..33.67 rows=1,167 width=42) (actual time=0.004..0.389 rows=1,176 loops=1)

  • Output: product_variant.title, product_variant.id, product_variant.product_id
  • Buffers: shared hit=22
16. 0.348 0.348 ↑ 1.0 1 174

Index Scan using product_pkey on public.product (cost=0.28..0.42 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=174)

  • Output: product.created_date, product.updated_date, product.id, product.title, product.tags, product.labels, product.abi_product, product.brand_id, product.rgb, product.showcase_order, product.attachment, product.description, product.short_description, product.type, product.has_fixed_price
  • Index Cond: (product.id = product_category.product_id)
  • Buffers: shared hit=522
17. 0.004 0.008 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=13) (actual time=0.008..0.008 rows=6 loops=1)

  • Output: category.title, category.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
18. 0.004 0.004 ↑ 1.0 6 1

Seq Scan on public.category (cost=0.00..1.06 rows=6 width=13) (actual time=0.002..0.004 rows=6 loops=1)

  • Output: category.title, category.id
  • Buffers: shared hit=1
19. 0.011 0.021 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=13) (actual time=0.021..0.021 rows=25 loops=1)

  • Output: brand.title, brand.id
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
20. 0.010 0.010 ↑ 1.0 25 1

Seq Scan on public.brand (cost=0.00..1.25 rows=25 width=13) (actual time=0.005..0.010 rows=25 loops=1)

  • Output: brand.title, brand.id
  • Buffers: shared hit=1
Planning time : 2.260 ms
Execution time : 3.363 ms