explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9l7h

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 0.743 ↑ 1.0 1 1

Nested Loop (cost=115.17..135.08 rows=1 width=1,673) (actual time=0.697..0.743 rows=1 loops=1)

2. 0.051 0.679 ↑ 1.0 1 1

Bitmap Heap Scan on promotion_criterion (cost=114.89..126.78 rows=1 width=4) (actual time=0.648..0.679 rows=1 loops=1)

  • Recheck Cond: ((((key)::text = 'market'::text) AND (operator = 1) AND (value = '"SE"'::jsonb)) OR (((key)::text = 'market'::text) AND (operator = 7)) OR (((key)::text = 'market'::text) AND (operator = 2)) OR (((key)::text = 'store'::text) AND (operator = 1) AND (value = '"10010"'::jsonb)) OR (((key)::text = 'store'::text) AND (operator = 7)) OR (((key)::text = 'store'::text) AND (operator = 2)) OR (((key)::text = 'cart_total'::text) AND (operator = 1) AND (value = '123.0'::jsonb)) OR (((key)::text = 'cart_total'::text) AND (operator = 7)) OR (((key)::text = 'cart_total'::text) AND (operator = 2)) OR (((key)::text = 'sku'::text) AND (operator = 1) AND (value = '"AAA"'::jsonb)) OR (((key)::text = 'sku'::text) AND (operator = 7)) OR (((key)::text = 'sku'::text) AND (operator = 2)) OR (((key)::text = 'product'::text) AND (operator = 1) AND (value = '"AA"'::jsonb)) OR (((key)::text = 'product'::text) AND (operator = 7)) OR (((key)::text = 'product'::text) AND (operator = 2)) OR (((key)::text = 'style'::text) AND (operator = 1) AND (value = '"A"'::jsonb)) OR (((key)::text = 'style'::text) AND (operator = 7)) OR (((key)::text = 'style'::text) AND (operator = 2)) OR (((key)::text = 'item_type'::text) AND (operator = 1) AND (value = '1'::jsonb)) OR (((key)::text = 'item_type'::text) AND (operator = 7)) OR (((key)::text = 'item_type'::text) AND (operator = 2)) OR (((key)::text = 'category'::text) AND (operator = 1) AND (value = ANY ('{"\"high-waist\"","\"jeans\"","\"clothing\""}'::jsonb[]))) OR (((key)::text = 'category'::text) AND (operator = 7)) OR (((key)::text = 'category'::text) AND (operator = 2)))
  • Filter: ((((key)::text = 'market'::text) AND (operator = 1) AND (value = '"SE"'::jsonb)) OR (((key)::text = 'market'::text) AND (operator = 7) AND (value @> '["SE"]'::jsonb)) OR (((key)::text = 'market'::text) AND (operator = 2) AND (value <> '"SE"'::jsonb)) OR (((key)::text = 'store'::text) AND (operator = 1) AND (value = '"10010"'::jsonb)) OR (((key)::text = 'store'::text) AND (operator = 7) AND (value @> '["10010"]'::jsonb)) OR (((key)::text = 'store'::text) AND (operator = 2) AND (value <> '"10010"'::jsonb)) OR (((key)::text = 'cart_total'::text) AND (operator = 1) AND (value = '123.0'::jsonb)) OR (((key)::text = 'cart_total'::text) AND (operator = 7) AND (value @> '[123.0]'::jsonb)) OR (((key)::text = 'cart_total'::text) AND (operator = 2) AND (value <> '123.0'::jsonb)) OR (((key)::text = 'sku'::text) AND (operator = 1) AND (value = '"AAA"'::jsonb)) OR (((key)::text = 'sku'::text) AND (operator = 7) AND (value @> '["AAA"]'::jsonb)) OR (((key)::text = 'sku'::text) AND (operator = 2) AND (value <> '"AAA"'::jsonb)) OR (((key)::text = 'product'::text) AND (operator = 1) AND (value = '"AA"'::jsonb)) OR (((key)::text = 'product'::text) AND (operator = 7) AND (value @> '["AA"]'::jsonb)) OR (((key)::text = 'product'::text) AND (operator = 2) AND (value <> '"AA"'::jsonb)) OR (((key)::text = 'style'::text) AND (operator = 1) AND (value = '"A"'::jsonb)) OR (((key)::text = 'style'::text) AND (operator = 7) AND (value @> '["A"]'::jsonb)) OR (((key)::text = 'style'::text) AND (operator = 2) AND (value <> '"A"'::jsonb)) OR (((key)::text = 'item_type'::text) AND (operator = 1) AND (value = '1'::jsonb)) OR (((key)::text = 'item_type'::text) AND (operator = 7) AND (value @> '[1]'::jsonb)) OR (((key)::text = 'item_type'::text) AND (operator = 2) AND (value <> '1'::jsonb)) OR (((key)::text = 'category'::text) AND (operator = 1) AND (value = ANY ('{"\"high-waist\"","\"jeans\"","\"clothing\""}'::jsonb[]))) OR (((key)::text = 'category'::text) AND (operator = 7) AND (value @> '["high-waist", "jeans", "clothing"]'::jsonb)) OR (((key)::text = 'category'::text) AND (operator = 2) AND (value <> ALL ('{"\"high-waist\"","\"jeans\"","\"clothing\""}'::jsonb[]))))
  • Heap Blocks: exact=1
3. 0.001 0.628 ↓ 0.0 0 1

BitmapOr (cost=114.89..114.89 rows=3 width=0) (actual time=0.620..0.628 rows=0 loops=1)

4. 0.025 0.025 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.017..0.025 rows=0 loops=1)

  • Index Cond: (((key)::text = 'market'::text) AND (operator = 1) AND (value = '"SE"'::jsonb))
5. 0.024 0.024 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.015..0.024 rows=0 loops=1)

  • Index Cond: (((key)::text = 'market'::text) AND (operator = 7))
6. 0.022 0.022 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.022 rows=0 loops=1)

  • Index Cond: (((key)::text = 'market'::text) AND (operator = 2))
7. 0.056 0.056 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.014..0.056 rows=0 loops=1)

  • Index Cond: (((key)::text = 'store'::text) AND (operator = 1) AND (value = '"10010"'::jsonb))
8. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.015..0.023 rows=0 loops=1)

  • Index Cond: (((key)::text = 'store'::text) AND (operator = 7))
9. 0.033 0.033 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.033 rows=0 loops=1)

  • Index Cond: (((key)::text = 'store'::text) AND (operator = 2))
10. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.014..0.023 rows=0 loops=1)

  • Index Cond: (((key)::text = 'cart_total'::text) AND (operator = 1) AND (value = '123.0'::jsonb))
11. 0.022 0.022 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.014..0.022 rows=0 loops=1)

  • Index Cond: (((key)::text = 'cart_total'::text) AND (operator = 7))
12. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'cart_total'::text) AND (operator = 2))
13. 0.027 0.027 ↑ 1.0 1 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.019..0.027 rows=1 loops=1)

  • Index Cond: (((key)::text = 'sku'::text) AND (operator = 1) AND (value = '"AAA"'::jsonb))
14. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'sku'::text) AND (operator = 7))
15. 0.019 0.019 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.019 rows=0 loops=1)

  • Index Cond: (((key)::text = 'sku'::text) AND (operator = 2))
16. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'product'::text) AND (operator = 1) AND (value = '"AA"'::jsonb))
17. 0.021 0.021 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.021 rows=0 loops=1)

  • Index Cond: (((key)::text = 'product'::text) AND (operator = 7))
18. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.015..0.023 rows=0 loops=1)

  • Index Cond: (((key)::text = 'product'::text) AND (operator = 2))
19. 0.021 0.021 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.021 rows=0 loops=1)

  • Index Cond: (((key)::text = 'style'::text) AND (operator = 1) AND (value = '"A"'::jsonb))
20. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'style'::text) AND (operator = 7))
21. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.012..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'style'::text) AND (operator = 2))
22. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'item_type'::text) AND (operator = 1) AND (value = '1'::jsonb))
23. 0.024 0.024 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.016..0.024 rows=0 loops=1)

  • Index Cond: (((key)::text = 'item_type'::text) AND (operator = 7))
24. 0.037 0.037 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.029..0.037 rows=0 loops=1)

  • Index Cond: (((key)::text = 'item_type'::text) AND (operator = 2))
25. 0.042 0.042 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..13.26 rows=1 width=0) (actual time=0.034..0.042 rows=0 loops=1)

  • Index Cond: (((key)::text = 'category'::text) AND (operator = 1) AND (value = ANY ('{"\"high-waist\"","\"jeans\"","\"clothing\""}'::jsonb[])))
26. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.013..0.020 rows=0 loops=1)

  • Index Cond: (((key)::text = 'category'::text) AND (operator = 7))
27. 0.045 0.045 ↓ 0.0 0 1

Bitmap Index Scan on promotion_c_key_7b1368_idx (cost=0.00..4.42 rows=1 width=0) (actual time=0.038..0.045 rows=0 loops=1)

  • Index Cond: (((key)::text = 'category'::text) AND (operator = 2))
28. 0.033 0.033 ↑ 1.0 1 1

Index Scan using promotion_pricerule_pkey on promotion_pricerule (cost=0.28..8.30 rows=1 width=1,673) (actual time=0.025..0.033 rows=1 loops=1)

  • Index Cond: (id = promotion_criterion.price_rule_id)
Planning time : 0.952 ms
Execution time : 2.010 ms