explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W5So

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1.488 ↓ 0.0 0 1

Limit (cost=1,038.15..1,038.18 rows=11 width=8,959) (actual time=1.466..1.488 rows=0 loops=1)

2. 0.013 1.483 ↓ 0.0 0 1

Sort (cost=1,038.15..1,038.18 rows=11 width=8,959) (actual time=1.463..1.483 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) * '1000'::double precision)) * '1'::double precision)) DESC, items_0.item_id DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.004 1.470 ↓ 0.0 0 1

WindowAgg (cost=207.50..1,037.96 rows=11 width=8,959) (actual time=1.452..1.470 rows=0 loops=1)

4. 0.004 1.466 ↓ 0.0 0 1

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

5. 0.003 1.462 ↓ 0.0 0 1

Nested Loop Left Join (cost=206.79..1,005.43 rows=11 width=8,826) (actual time=1.448..1.462 rows=0 loops=1)

6. 0.003 1.459 ↓ 0.0 0 1

Nested Loop Left Join (cost=206.09..973.25 rows=11 width=8,818) (actual time=1.446..1.459 rows=0 loops=1)

7. 0.004 1.456 ↓ 0.0 0 1

Nested Loop Left Join (cost=205.53..942.62 rows=11 width=8,810) (actual time=1.445..1.456 rows=0 loops=1)

8. 0.003 1.452 ↓ 0.0 0 1

Nested Loop Left Join (cost=204.96..911.93 rows=11 width=5,015) (actual time=1.443..1.452 rows=0 loops=1)

9. 0.003 1.449 ↓ 0.0 0 1

Nested Loop Left Join (cost=204.53..882.70 rows=11 width=4,983) (actual time=1.441..1.449 rows=0 loops=1)

10. 0.004 1.446 ↓ 0.0 0 1

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

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

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

12. 0.006 1.439 ↓ 0.0 0 1

Bitmap Heap Scan on items_0 (cost=203.08..521.81 rows=90 width=1,206) (actual time=1.436..1.439 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.433 1.433 ↓ 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.432..1.433 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_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))
17. 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))
18. 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))
19. 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))
20. 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))
21. 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))
Planning time : 31.130 ms
Execution time : 2.386 ms