explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GqU4

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 5,905.663 ↑ 1.0 100 1

Limit (cost=100.85..346.38 rows=100 width=16) (actual time=5,905.133..5,905.663 rows=100 loops=1)

2.          

Initplan (forLimit)

3. 0.002 6.322 ↑ 1,927.0 1 1

Nested Loop (cost=0.56..190,516.52 rows=1,927 width=0) (actual time=6.322..6.322 rows=1 loops=1)

4. 6.313 6.313 ↑ 1,927.0 1 1

Seq Scan on order_attributes oa (cost=0.00..179,728.41 rows=1,927 width=8) (actual time=6.313..6.313 rows=1 loops=1)

  • Filter: (name = 'is_under_double_check'::text)
  • Rows Removed by Filter: 46510
5. 0.007 0.007 ↑ 1.0 1 1

Index Only Scan using orders_pkey on orders o_1 (cost=0.56..5.59 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = oa.order_id)
  • Heap Fetches: 0
6. 6.327 5,905.655 ↑ 67,485.1 100 1

Result (cost=1.43..16,569,709.69 rows=6,748,510 width=16) (actual time=5,905.130..5,905.655 rows=100 loops=1)

  • One-Time Filter: $1
7. 0.087 5,899.328 ↑ 67,485.1 100 1

Nested Loop (cost=1.43..16,569,709.69 rows=6,748,510 width=16) (actual time=5,898.807..5,899.328 rows=100 loops=1)

  • Join Filter: ((o.status_confirmed_at <= (now() - '3 days'::interval)) OR (oat.value = 'true'::jsonb) OR (oad.value = 'false'::jsonb))
8. 0.000 5,899.141 ↑ 27,189.5 100 1

Nested Loop (cost=0.99..14,920,261.45 rows=2,718,945 width=41) (actual time=5,898.798..5,899.141 rows=100 loops=1)

9. 2,211.672 2,211.672 ↑ 3.8 3,980,421 1

Index Scan using idx_orders_status_confirmed_at on orders o (cost=0.56..6,202,122.82 rows=14,988,631 width=16) (actual time=0.005..2,211.672 rows=3,980,421 loops=1)

10. 3,980.421 3,980.421 ↓ 0.0 0 3,980,421

Index Scan using order_attributes_order_id on order_attributes oad (cost=0.43..0.56 rows=2 width=25) (actual time=0.001..0.001 rows=0 loops=3,980,421)

  • Index Cond: (order_id = o.id)
  • Filter: (name = 'is_double_check_required'::text)
  • Rows Removed by Filter: 0
11. 0.100 0.100 ↑ 2.0 1 100

Index Scan using order_attributes_order_id on order_attributes oat (cost=0.43..0.56 rows=2 width=25) (actual time=0.001..0.001 rows=1 loops=100)

  • Index Cond: (order_id = o.id)
  • Filter: (name = 'is_terminal'::text)
  • Rows Removed by Filter: 1