explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jIWa

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1.446 ↓ 0.0 0 1

Limit (cost=2,477.09..2,477.49 rows=158 width=103) (actual time=1.435..1.446 rows=0 loops=1)

2. 0.008 1.443 ↓ 0.0 0 1

Sort (cost=2,477.09..2,477.49 rows=158 width=103) (actual time=1.433..1.443 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, '''milk'''::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.435 ↓ 0.0 0 1

WindowAgg (cost=81.49..2,471.32 rows=158 width=103) (actual time=1.426..1.435 rows=0 loops=1)

4. 0.003 1.431 ↓ 0.0 0 1

Nested Loop Left Join (cost=81.49..2,466.19 rows=158 width=496) (actual time=1.424..1.431 rows=0 loops=1)

5. 0.002 1.428 ↓ 0.0 0 1

Nested Loop Left Join (cost=80.78..2,004.04 rows=158 width=488) (actual time=1.422..1.428 rows=0 loops=1)

6. 0.003 1.426 ↓ 0.0 0 1

Nested Loop Left Join (cost=80.08..1,541.89 rows=158 width=484) (actual time=1.421..1.426 rows=0 loops=1)

7. 0.003 1.423 ↓ 0.0 0 1

Nested Loop Left Join (cost=79.52..1,101.86 rows=158 width=476) (actual time=1.420..1.423 rows=0 loops=1)

8. 0.005 1.420 ↓ 0.0 0 1

Bitmap Heap Scan on items_0 (cost=78.95..659.46 rows=158 width=468) (actual time=1.418..1.420 rows=0 loops=1)

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

Bitmap Index Scan on search_index_v2_items_0 (cost=0.00..78.91 rows=521 width=0) (actual time=1.414..1.415 rows=0 loops=1)

  • Index Cond: ((full_text_v2 @@ '''milk'''::tsquery) AND (inventory_area_id = 20,636))
10. 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))
11. 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 = 'milk'::text))
12. 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 = 'milk'::text) AND (retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
13. 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 = 'milk'::text) AND (retailer_id = '-1'::integer) AND (product_id = items_0.product_id))
Planning time : 1.209 ms
Execution time : 1.538 ms