explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jGR2

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 22,432.249 ↓ 0.0 0 1

Limit (cost=1.86..27,491.26 rows=100 width=16) (actual time=22,432.249..22,432.249 rows=0 loops=1)

2. 1.874 22,432.248 ↓ 0.0 0 1

Nested Loop (cost=1.86..14,656,526.54 rows=53,317 width=16) (actual time=22,432.248..22,432.248 rows=0 loops=1)

  • Join Filter: ((o.status_confirmed_at <= (now() - '3 days'::interval)) OR (oat.value = 'true'::jsonb) OR (oad.value = 'false'::jsonb))
  • Rows Removed by Join Filter: 2118
3. 0.757 22,426.138 ↓ 6.1 2,118 1

Nested Loop (cost=1.43..14,656,313.40 rows=350 width=49) (actual time=8,209.181..22,426.138 rows=2,118 loops=1)

4. 2,003.945 22,421.145 ↓ 1.1 2,118 1

Nested Loop Semi Join (cost=0.99..14,655,188.10 rows=1,927 width=24) (actual time=8,209.173..22,421.145 rows=2,118 loops=1)

5. 7,700.084 7,700.084 ↑ 1.2 12,717,116 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.006..7,700.084 rows=12,717,116 loops=1)

6. 12,717.116 12,717.116 ↓ 0.0 0 12,717,116

Index Scan using order_attributes_order_id on order_attributes oa (cost=0.43..0.56 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=12,717,116)

  • Index Cond: (order_id = o.id)
  • Filter: (name = 'is_under_double_check'::text)
  • Rows Removed by Filter: 1
7. 4.236 4.236 ↑ 2.0 1 2,118

Index Scan using order_attributes_order_id on order_attributes oad (cost=0.43..0.56 rows=2 width=25) (actual time=0.002..0.002 rows=1 loops=2,118)

  • Index Cond: (order_id = o.id)
  • Filter: (name = 'is_double_check_required'::text)
  • Rows Removed by Filter: 2
8. 4.236 4.236 ↑ 2.0 1 2,118

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

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