explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tfov

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 1.412 ↓ 0.0 0 1

Limit (cost=1,038.15..1,038.18 rows=11 width=8,955) (actual time=1.395..1.412 rows=0 loops=1)

2. 0.011 1.408 ↓ 0.0 0 1

Sort (cost=1,038.15..1,038.18 rows=11 width=8,955) (actual time=1.392..1.408 rows=0 loops=1)

  • Sort Key: retailer_term_v2s.score DESC NULLS LAST, generic_term_v2s.score DESC NULLS LAST, ((((ts_rank(items_0.full_text_v2, '''appl'''::tsquery, 1) * '100'::double precision) + (COALESCE(products_conversions.score, '0'::double precision) * '100'::double precision)) * '1'::double precision)) DESC, items_0.item_id DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.004 1.397 ↓ 0.0 0 1

WindowAgg (cost=207.50..1,037.96 rows=11 width=8,955) (actual time=1.382..1.397 rows=0 loops=1)

4. 0.003 1.393 ↓ 0.0 0 1

Nested Loop Left Join (cost=207.50..1,037.61 rows=11 width=8,834) (actual time=1.380..1.393 rows=0 loops=1)

5. 0.003 1.390 ↓ 0.0 0 1

Nested Loop Left Join (cost=206.93..1,006.92 rows=11 width=5,039) (actual time=1.378..1.390 rows=0 loops=1)

6. 0.002 1.387 ↓ 0.0 0 1

Nested Loop Left Join (cost=206.49..977.68 rows=11 width=5,007) (actual time=1.377..1.387 rows=0 loops=1)

7. 0.003 1.385 ↓ 0.0 0 1

Nested Loop Left Join (cost=206.06..948.45 rows=11 width=4,162) (actual time=1.376..1.385 rows=0 loops=1)

8. 0.003 1.382 ↓ 0.0 0 1

Nested Loop Left Join (cost=205.35..916.27 rows=11 width=4,154) (actual time=1.374..1.382 rows=0 loops=1)

9. 0.002 1.379 ↓ 0.0 0 1

Nested Loop Left Join (cost=204.65..884.10 rows=11 width=4,146) (actual time=1.373..1.379 rows=0 loops=1)

10. 0.003 1.377 ↓ 0.0 0 1

Nested Loop Left Join (cost=204.09..853.46 rows=11 width=4,138) (actual time=1.371..1.377 rows=0 loops=1)

  • Filter: (COALESCE(items_availabilities.availability_score, '0.87'::double precision) > '0'::double precision)
11. 0.004 1.374 ↓ 0.0 0 1

Nested Loop (cost=203.52..760.98 rows=33 width=4,130) (actual time=1.370..1.374 rows=0 loops=1)

12. 0.005 1.370 ↓ 0.0 0 1

Bitmap Heap Scan on items_0 (cost=203.08..521.81 rows=90 width=1,206) (actual time=1.368..1.370 rows=0 loops=1)

  • Recheck Cond: ((full_text_v2 @@ '''appl'''::tsquery) AND (inventory_area_id = 20,636))
  • Filter: (visible AND available AND (NOT alcoholic))
13. 1.365 1.365 ↓ 0.0 0 1

Bitmap Index Scan on search_index_v2_items_0 (cost=0.00..203.06 rows=286 width=0) (actual time=1.364..1.365 rows=0 loops=1)

  • Index Cond: ((full_text_v2 @@ '''appl'''::tsquery) AND (inventory_area_id = 20,636))
14. 0.000 0.000 ↓ 0.0 0

Index Scan using index_retailer_products_on_retailer_id_and_product_id on retailer_products (cost=0.44..2.66 rows=1 width=2,924) (never executed)

  • Index Cond: ((retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using items_availabilities_0_item_id_idx on items_availabilities_0 items_availabilities (cost=0.57..2.79 rows=1 width=20) (never executed)

  • Index Cond: (item_id = items_0.item_id)
  • Filter: ((inventory_area_id = 20,636) AND (inventory_area_id = items_0.inventory_area_id))
16. 0.000 0.000 ↓ 0.0 0

Index Scan using index_products_conversions_on_cpk on products_conversions (cost=0.56..2.79 rows=1 width=12) (never executed)

  • Index Cond: ((version = 3) AND (product_id = items_0.product_id) AND ((query)::text = 'apple'::text))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using index_retailer_products_term_v2s_on_natural_key on retailer_products_term_v2s retailer_term_v2s (cost=0.70..2.92 rows=1 width=16) (never executed)

  • Index Cond: ((term = 'apple'::text) AND (retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
18. 0.000 0.000 ↓ 0.0 0

Index Scan using index_retailer_products_term_v2s_on_natural_key on retailer_products_term_v2s generic_term_v2s (cost=0.70..2.92 rows=1 width=12) (never executed)

  • Index Cond: ((term = 'apple'::text) AND (retailer_id = '-1'::integer) AND (product_id = items_0.product_id))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using index_deprecated_retailer_products_mls_cpk on deprecated_retailer_products_mls (cost=0.44..2.66 rows=1 width=853) (never executed)

  • Index Cond: ((retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
20. 0.000 0.000 ↓ 0.0 0

Index Scan using index_deprecated_retailer_products_cpgs_cpk on deprecated_retailer_products_cpgs (cost=0.44..2.66 rows=1 width=40) (never executed)

  • Index Cond: ((retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
21. 0.000 0.000 ↓ 0.0 0

Index Scan using deprecated_items_denormalized_retailer_id_product_id_invent_idx on deprecated_items_denormalizeds_0 (cost=0.56..2.79 rows=1 width=3,795) (never executed)

  • Index Cond: ((retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id) AND (inventory_area_id = items_0.inventory_area_id) AND (inventory_area_id = 20,636))
Planning time : 20.376 ms
Execution time : 2.300 ms