explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pi1m : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #Wp49; plan #wBnj; plan #11Zp; plan #agp5; plan #M6Gb

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 3.003 20.484 ↓ 2.1 759 1

Nested Loop (cost=17.62..3,842.42 rows=361 width=224) (actual time=0.102..20.484 rows=759 loops=1)

2. 0.827 3.729 ↓ 1.7 4,584 1

Nested Loop (cost=17.20..2,268.22 rows=2,749 width=4) (actual time=0.037..3.729 rows=4,584 loops=1)

3. 0.015 0.030 ↓ 1.6 8 1

Bitmap Heap Scan on shop_catalog_category (cost=4.21..24.16 rows=5 width=4) (actual time=0.022..0.030 rows=8 loops=1)

  • Recheck Cond: (tree_id = 2)
  • Filter: ((lft >= 1) AND (lft <= 16))
  • Heap Blocks: exact=4
4. 0.015 0.015 ↑ 1.0 8 1

Bitmap Index Scan on shop_catalog_category_tree_id_fa7e2b98 (cost=0.00..4.21 rows=8 width=0) (actual time=0.014..0.015 rows=8 loops=1)

  • Index Cond: (tree_id = 2)
5. 2.312 2.872 ↑ 1.0 573 8

Bitmap Heap Scan on shop_catalog_product_full_category (cost=12.99..442.91 rows=590 width=8) (actual time=0.089..0.359 rows=573 loops=8)

  • Recheck Cond: (category_id = shop_catalog_category.id)
  • Heap Blocks: exact=1,100
6. 0.560 0.560 ↑ 1.0 573 8

Bitmap Index Scan on shop_catalog_product_full_category_category_id_60608c45 (cost=0.00..12.85 rows=590 width=0) (actual time=0.070..0.070 rows=573 loops=8)

  • Index Cond: (category_id = shop_catalog_category.id)
7. 13.752 13.752 ↓ 0.0 0 4,584

Index Scan using shop_catalog_product_pkey on shop_catalog_product (cost=0.42..0.56 rows=1 width=224) (actual time=0.003..0.003 rows=0 loops=4,584)

  • Index Cond: (id = shop_catalog_product_full_category.product_id)
  • Filter: (is_active AND is_main_active AND is_main_color_variant AND is_main_size_variant AND ((main_image)::text <> ''::text))
  • Rows Removed by Filter: 1
Planning time : 0.555 ms
Execution time : 20.633 ms