explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zxi5

Settings
# exclusive inclusive rows x rows loops node
1. 18.095 285.614 ↑ 1.0 10,000 1

Limit (cost=38.75..51,124.63 rows=10,000 width=8) (actual time=0.038..285.614 rows=10,000 loops=1)

2. 38.756 267.519 ↑ 3.2 10,000 1

Merge Semi Join (cost=38.75..164,514.84 rows=32,196 width=8) (actual time=0.036..267.519 rows=10,000 loops=1)

  • Merge Cond: (o.id = op."orderRef")
3. 80.384 137.688 ↑ 3.2 10,000 1

Index Scan Backward using "OrderDO_pkey" on "OrderDO" o (cost=0.29..155,331.51 rows=32,196 width=8) (actual time=0.020..137.688 rows=10,000 loops=1)

  • Filter: (("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[])) AND ((((id)::character varying)::text ~~ '%12%'::text) OR (lower(("shopOrderNo")::text) ~~ '%12%'::text) OR (("shopCustomerOrderNo" IS NOT NULL) AND (lower (...)
  • Rows Removed by Filter: 6280
4.          

SubPlan (for Index Scan Backward)

5. 57.304 57.304 ↓ 0.0 0 7,163

Index Scan using "index_OrderPropertyDO_orderRef" on "OrderPropertyDO" (cost=0.29..8.37 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=7,163)

  • Index Cond: ("orderRef" = o.id)
  • Filter: (((key)::text = ANY ('{customOrderNo,myOrderNo,SAPOrder}'::text[])) AND (lower((value)::text) ~~ '%12%'::text))
  • Rows Removed by Filter: 3
6. 91.075 91.075 ↑ 1.6 32,559 1

Index Scan Backward using "index_OrderPosDO_orderRef" on "OrderPosDO" op (cost=0.42..8,486.71 rows=52,787 width=8) (actual time=0.012..91.075 rows=32,559 loops=1)

  • Filter: ("supplierRef" = ANY ('{1100,1210,1212,1211,1200,2000,1000,3000,1}'::bigint[]))
Planning time : 0.833 ms
Execution time : 291.617 ms