explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UQ6r

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 7.656 ↑ 83.5 4 1

Limit (cost=7,223.38..7,224.22 rows=334 width=8) (actual time=7.651..7.656 rows=4 loops=1)

2. 0.009 7.652 ↑ 83.5 4 1

Sort (cost=7,223.38..7,224.22 rows=334 width=8) (actual time=7.649..7.652 rows=4 loops=1)

  • Sort Key: o.id DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.066 7.643 ↑ 83.5 4 1

Hash Semi Join (cost=156.28..7,209.38 rows=334 width=8) (actual time=5.758..7.643 rows=4 loops=1)

  • Hash Cond: (o.id = op."orderRef")
4. 1.694 5.331 ↑ 83.5 4 1

Bitmap Heap Scan on "OrderDO" o (cost=40.24..7,087.49 rows=334 width=8) (actual time=3.466..5.331 rows=4 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: 854
  • Heap Blocks: exact=38
5. 0.209 0.209 ↓ 1.4 882 1

Bitmap Index Scan on "index_OrderDO_shopRef" (cost=0.00..40.16 rows=643 width=0) (actual time=0.208..0.209 rows=882 loops=1)

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

SubPlan (for Bitmap Heap Scan)

7. 1.714 3.428 ↓ 0.0 0 857

Bitmap Heap Scan on "OrderPropertyDO" (cost=4.32..17.41 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=857)

  • Recheck Cond: ("orderRef" = o.id)
  • Filter: (((key)::text = ANY ('{myOrderNo,SAPOrder}'::text[])) AND ((value)::text ~~ '%456%'::text))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=283
8. 1.714 1.714 ↑ 5.0 1 857

Bitmap Index Scan on "index_OrderPropertyDO_orderRef" (cost=0.00..4.31 rows=5 width=0) (actual time=0.002..0.002 rows=1 loops=857)

  • Index Cond: ("orderRef" = o.id)
9. 0.873 2.246 ↓ 1.2 1,432 1

Hash (cost=101.37..101.37 rows=1,174 width=8) (actual time=2.245..2.246 rows=1,432 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 72kB
10. 1.373 1.373 ↓ 1.2 1,432 1

Seq Scan on "OrderPosDO" op (cost=0.00..101.37 rows=1,174 width=8) (actual time=0.008..1.373 rows=1,432 loops=1)

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