explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xP8Y

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

Nested Loop (cost=4.88..28.80 rows=1 width=1,095) (actual time=0.061..0.061 rows=0 loops=1)

  • Join Filter: (ou.order_id = op.order_id)
2. 0.007 0.052 ↑ 1.0 1 1

Nested Loop (cost=4.60..28.48 rows=1 width=1,055) (actual time=0.050..0.052 rows=1 loops=1)

3. 0.008 0.025 ↑ 2.0 1 1

Bitmap Heap Scan on order_users ou (cost=4.31..11.83 rows=2 width=40) (actual time=0.025..0.025 rows=1 loops=1)

  • Recheck Cond: (user_id = 9,552,695)
  • Heap Blocks: exact=1
4. 0.017 0.017 ↑ 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.017..0.017 rows=1 loops=1)

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

Index Scan using orders_id_idx on orders o (cost=0.29..8.31 rows=1 width=1,015) (actual time=0.019..0.020 rows=1 loops=1)

  • Index Cond: (id = ou.order_id)
  • Filter: (status <> 'cancel'::order_status_enum)
6. 0.006 0.006 ↓ 0.0 0 1

Index Scan using order_promotions_order_id_promotion_id_idx on order_promotions op (cost=0.28..0.31 rows=1 width=40) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((order_id = o.id) AND (promotion_id = 19,097))
Planning time : 1.714 ms
Execution time : 0.374 ms