explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YZpv

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 9.520 ↑ 1.0 1 1

Aggregate (cost=7,688.45..7,688.46 rows=1 width=8) (actual time=9.518..9.520 rows=1 loops=1)

2. 0.006 9.503 ↑ 62.0 6 1

Limit (cost=7,682.87..7,683.80 rows=372 width=8) (actual time=9.494..9.503 rows=6 loops=1)

3. 0.031 9.497 ↑ 62.0 6 1

Sort (cost=7,682.87..7,683.80 rows=372 width=8) (actual time=9.492..9.497 rows=6 loops=1)

  • Sort Key: o.id DESC
  • Sort Method: quicksort Memory: 25kB
4. 0.060 9.466 ↑ 62.0 6 1

Hash Semi Join (cost=171.31..7,666.99 rows=372 width=8) (actual time=5.525..9.466 rows=6 loops=1)

  • Hash Cond: (o.id = op."orderRef")
5. 1.883 6.115 ↑ 62.0 6 1

Bitmap Heap Scan on "OrderDO" o (cost=40.70..7,529.41 rows=372 width=8) (actual time=2.192..6.115 rows=6 loops=1)

  • Recheck Cond: ("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[]))
  • Filter: ((((id)::character varying)::text ~~ '%456%'::text) OR (("shopOrderNo")::text ~~ '%456%'::text) OR (SubPlan 1))
  • Rows Removed by Filter: 995
  • Heap Blocks: exact=38
6. 0.236 0.236 ↓ 1.9 1,339 1

Bitmap Index Scan on "index_OrderDO_shopRef" (cost=0.00..40.61 rows=709 width=0) (actual time=0.236..0.236 rows=1,339 loops=1)

  • Index Cond: ("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[]))
7.          

SubPlan (for Bitmap Heap Scan)

8. 3.996 3.996 ↓ 0.0 0 999

Index Scan using "index_OrderPropertyDO_orderRef" on "OrderPropertyDO" (cost=0.28..20.66 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=999)

  • Index Cond: ("orderRef" = o.id)
  • Filter: (((key)::text = ANY ('{myOrderNo,SAPOrder}'::text[])) AND ((value)::text ~~ '%456%'::text))
  • Rows Removed by Filter: 2
9. 1.250 3.291 ↓ 1.2 1,580 1

Hash (cost=113.83..113.83 rows=1,342 width=8) (actual time=3.290..3.291 rows=1,580 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 78kB
10. 2.041 2.041 ↓ 1.2 1,580 1

Seq Scan on "OrderPosDO" op (cost=0.00..113.83 rows=1,342 width=8) (actual time=0.020..2.041 rows=1,580 loops=1)

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