explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vjEW

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

Limit (cost=4.74..28.65 rows=1 width=981) (actual time=0.086..0.086 rows=0 loops=1)

2. 0.007 0.083 ↓ 0.0 0 1

Nested Loop Left Join (cost=4.74..28.65 rows=1 width=981) (actual time=0.083..0.083 rows=0 loops=1)

  • Filter: ((COALESCE(orders.promotion_code, ''::text) <> ''::text) OR (COALESCE(order_origins.promotion_code, ''::text) <> ''::text))
  • Rows Removed by Filter: 1
3. 0.007 0.075 ↑ 1.0 1 1

Nested Loop (cost=4.60..28.48 rows=1 width=981) (actual time=0.073..0.075 rows=1 loops=1)

4. 0.013 0.032 ↑ 2.0 1 1

Bitmap Heap Scan on order_users (cost=4.31..11.83 rows=2 width=4) (actual time=0.031..0.032 rows=1 loops=1)

  • Recheck Cond: (user_id = 9,552,695)
  • Heap Blocks: exact=1
5. 0.019 0.019 ↑ 2.0 1 1

Bitmap Index Scan on order_users_user_id_idx (cost=0.00..4.30 rows=2 width=0) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (user_id = 9,552,695)
6. 0.036 0.036 ↑ 1.0 1 1

Index Scan using orders_id_idx on orders (cost=0.29..8.31 rows=1 width=981) (actual time=0.035..0.036 rows=1 loops=1)

  • Index Cond: (id = order_users.order_id)
  • Filter: (status <> 'cancel'::order_status_enum)
7. 0.001 0.001 ↓ 0.0 0 1

Index Scan using order_origins_pkey on order_origins (cost=0.14..0.16 rows=1 width=13) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (id = orders.order_origin_id)
Planning time : 2.364 ms
Execution time : 0.523 ms