explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CBeh

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 21.407 ↓ 11.0 77 1

Limit (cost=597.75..597.76 rows=7 width=77) (actual time=21.387..21.407 rows=77 loops=1)

2. 0.079 21.397 ↓ 11.0 77 1

Sort (cost=597.75..597.76 rows=7 width=77) (actual time=21.387..21.397 rows=77 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, '''water'''::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: 35kB
3. 0.173 21.318 ↓ 11.0 77 1

WindowAgg (cost=26.40..597.65 rows=7 width=77) (actual time=21.218..21.318 rows=77 loops=1)

4. 0.034 21.145 ↓ 11.0 77 1

Nested Loop Left Join (cost=26.40..597.42 rows=7 width=413) (actual time=1.134..21.145 rows=77 loops=1)

  • Join Filter: (generic_term_v2s.product_id = items_0.product_id)
5. 0.019 21.111 ↓ 11.0 77 1

Nested Loop Left Join (cost=26.25..589.14 rows=7 width=409) (actual time=1.131..21.111 rows=77 loops=1)

6. 0.090 21.015 ↓ 11.0 77 1

Nested Loop Left Join (cost=26.09..573.24 rows=7 width=405) (actual time=1.128..21.015 rows=77 loops=1)

7. 0.059 20.771 ↓ 11.0 77 1

Nested Loop Left Join (cost=25.68..513.40 rows=7 width=397) (actual time=1.117..20.771 rows=77 loops=1)

  • Join Filter: ((items_availabilities.inventory_area_id = items_0.inventory_area_id) AND (items_availabilities.item_id = items_0.item_id))
  • Filter: (COALESCE(items_availabilities.availability_score, '0.87'::double precision) > '0.5'::double precision)
8. 20.557 20.712 ↓ 3.5 77 1

Bitmap Heap Scan on items_0 (cost=21.47..495.95 rows=22 width=393) (actual time=1.110..20.712 rows=77 loops=1)

  • Recheck Cond: ((full_text_v2 @@ '''water'''::tsquery) AND (inventory_area_id = 20,636))
  • Filter: (visible AND available)
  • Rows Removed by Filter: 90
  • Heap Blocks: exact=149
9. 0.155 0.155 ↓ 1.1 167 1

Bitmap Index Scan on search_index_v2_items_0 (cost=0.00..21.46 rows=146 width=0) (actual time=0.154..0.155 rows=167 loops=1)

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

Materialize (cost=4.21..14.39 rows=7 width=20) (actual time=0.000..0.000 rows=0 loops=77)

11. 0.001 0.003 ↓ 0.0 0 1

Bitmap Heap Scan on items_availabilities_0 items_availabilities (cost=4.21..14.35 rows=7 width=20) (actual time=0.003..0.003 rows=0 loops=1)

  • Recheck Cond: (inventory_area_id = 20,636)
12. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on items_availabilities_0_inventory_area_id_idx (cost=0.00..4.21 rows=7 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (inventory_area_id = 20,636)
13. 0.154 0.154 ↓ 0.0 0 77

Index Scan using index_products_conversions_on_cpk on products_conversions (cost=0.42..8.44 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=77)

  • Index Cond: ((version = 1) AND (product_id = items_0.product_id) AND ((query)::text = 'water'::text))
14. 0.077 0.077 ↓ 0.0 0 77

Index Scan using index_retailer_products_term_v2s_on_natural_key on retailer_products_term_v2s retailer_term_v2s (cost=0.15..2.17 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=77)

  • Index Cond: ((term = 'water'::text) AND (retailer_id = items_0.retailer_id) AND (product_id = items_0.product_id))
15. 0.000 0.000 ↓ 0.0 0 77

Materialize (cost=0.15..8.18 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=77)

16. 0.001 0.001 ↓ 0.0 0 1

Index Scan using index_retailer_products_term_v2s_on_natural_key on retailer_products_term_v2s generic_term_v2s (cost=0.15..8.17 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: ((term = 'water'::text) AND (retailer_id = '-1'::integer))
Planning time : 2.988 ms