explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RytV

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

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

2.          

Initplan (forLimit)

3. 0.003 4.597 ↑ 1,927.0 1 1

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

4. 4.588 4.588 ↑ 1,927.0 1 1

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

  • Filter: (name = 'is_under_double_check'::text)
  • Rows Removed by Filter: 46510
5. 0.006 0.006 ↑ 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.006..0.006 rows=1 loops=1)

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

Result (cost=1.43..16,569,709.69 rows=6,748,507 width=16) (actual time=5,887.096..5,887.635 rows=100 loops=1)

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

Nested Loop (cost=1.43..16,569,709.69 rows=6,748,507 width=16) (actual time=5,882.497..5,883.031 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,882.833 ↑ 27,189.5 100 1

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

9. 2,207.821 2,207.821 ↑ 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.004..2,207.821 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.200 0.200 ↑ 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.002 rows=1 loops=100)

  • Index Cond: (order_id = o.id)
  • Filter: (name = 'is_terminal'::text)
  • Rows Removed by Filter: 1
Planning time : 3.486 ms
Execution time : 5,887.787 ms