explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J1MK

Settings
# exclusive inclusive rows x rows loops node
1. 0.175 1,445.913 ↓ 248.0 248 1

Nested Loop (cost=45.62..652.42 rows=1 width=4) (actual time=133.883..1,445.913 rows=248 loops=1)

  • TALL","5XL TALL","New Born",0,0-3M,3-6M,6-12M,12-18M,18-24M,1,2,3,3M,4,4/5,5,5/6,5/9,6,6/8,6M,6Y,7,7/8,7/9,8,8M,9,9/11,10,10Y,10/12,10/13,11,12,12M,13,14,14Y,14-16,15,16,18,18-20,18M,20,22-24,24M,26-28,28,28P,29,29S,30,31,31R,32,33,33T,34,34T,35XT,36,37,37U,38,39,40,42,7-8.5,9-11,10-13,SR,LR,XLR,2XLR,3XLR,4XLR,5XLR,6XLR,Short}'::citext[])))
2. 119.490 1,442.722 ↓ 377.0 377 1

Nested Loop (cost=45.19..651.87 rows=1 width=8) (actual time=104.141..1,442.722 rows=377 loops=1)

3. 70.874 239.370 ↓ 921.7 541,931 1

Nested Loop (cost=44.77..343.68 rows=588 width=4) (actual time=0.725..239.370 rows=541,931 loops=1)

4. 0.028 2.066 ↓ 110.0 110 1

Nested Loop (cost=0.42..84.27 rows=1 width=4) (actual time=0.708..2.066 rows=110 loops=1)

5. 0.006 0.006 ↑ 1.0 1 1

Index Scan using index_spree_option_types_on_name on spree_option_types (cost=0.14..8.16 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: ((name)::text = 'sizes'::text)
6. 2.032 2.032 ↑ 1.0 110 1

Index Scan using index_spree_option_values_on_option_type_id_and_name on spree_option_values (cost=0.28..75.01 rows=110 width=8) (actual time=0.701..2.032 rows=110 loops=1)

  • Index Cond: ((option_type_id = spree_option_types.id) AND (name = ANY ('{Embroidery,"One Size",XXS,2XS,XXS/XS,XS,XS/S,S,S/M,M,M/L,L,L/XL,XL,XL/2XL,1XL,R,2T,2T/3T,3T,4T,5T,6T,ST,MT,"L TALL","XL TALL","2XL TALL","3XL TALL","4XL
7. 139.590 166.430 ↓ 2.3 4,927 110

Bitmap Heap Scan on spree_option_values_variants (cost=44.35..238.06 rows=2,134 width=8) (actual time=0.284..1.513 rows=4,927 loops=110)

  • Recheck Cond: (option_value_id = spree_option_values.id)
  • Heap Blocks: exact=30,435
8. 26.840 26.840 ↓ 2.3 4,927 110

Bitmap Index Scan on index_spree_option_values_variants_on_option_value_id (cost=0.00..43.81 rows=2,134 width=0) (actual time=0.244..0.244 rows=4,927 loops=110)

  • Index Cond: (option_value_id = spree_option_values.id)
9. 1,083.862 1,083.862 ↓ 0.0 0 541,931

Index Scan using spree_variants_pkey on spree_variants (cost=0.42..0.52 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=541,931)

  • Index Cond: (id = spree_option_values_variants.variant_id)
  • Filter: ((deleted_at IS NULL) AND (product_id = 1,287))
  • Rows Removed by Filter: 1
10. 3.016 3.016 ↑ 1.0 1 377

Index Scan using index_store_variants_on_spree_variant_id_and_spree_store_id on store_variants (cost=0.43..0.55 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=377)

  • Index Cond: ((spree_variant_id = spree_option_values_variants.variant_id) AND (spree_store_id = 1))
  • Filter: ((NOT closeout) AND sold)
  • Rows Removed by Filter: 0