explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YzaY

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 16.825 ↑ 1.0 1 1

Aggregate (cost=10,576.66..10,576.67 rows=1 width=8) (actual time=16.825..16.825 rows=1 loops=1)

2. 0.067 16.795 ↑ 10.7 58 1

Limit (cost=10,567.37..10,568.92 rows=619 width=8) (actual time=16.702..16.795 rows=58 loops=1)

3. 0.112 16.728 ↑ 10.7 58 1

Sort (cost=10,567.37..10,568.92 rows=619 width=8) (actual time=16.700..16.728 rows=58 loops=1)

  • Sort Key: o.id DESC
  • Sort Method: quicksort Memory: 27kB
4. 0.195 16.616 ↑ 10.7 58 1

Hash Semi Join (cost=290.11..10,538.67 rows=619 width=8) (actual time=8.768..16.616 rows=58 loops=1)

  • Hash Cond: (o.id = op."orderRef")
5. 3.324 10.189 ↑ 10.7 58 1

Bitmap Heap Scan on "OrderDO" o (cost=72.75..10,310.48 rows=619 width=8) (actual time=2.494..10.189 rows=58 loops=1)

  • Recheck Cond: ("shopRef" = ANY ('{0,500,1,200,210,220,230,120,100,300,110,111}'::bigint[]))
  • Filter: ((((id)::character varying)::text ~~ 'A4%'::text) OR (("shopOrderNo")::text ~~ 'A4%'::text) OR (("shopCustomerOrderNo")::text ~~ 'A4%'::text) OR (SubPlan 1))
  • Rows Removed by Filter: 1598
  • Heap Blocks: exact=74
6. 0.241 0.241 ↓ 1.4 1,665 1

Bitmap Index Scan on "index_OrderDO_shopRef" (cost=0.00..72.60 rows=1,231 width=0) (actual time=0.240..0.241 rows=1,665 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. 6.624 6.624 ↓ 0.0 0 1,656

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

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

Hash (cost=190.97..190.97 rows=2,111 width=8) (actual time=6.232..6.232 rows=2,636 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 135kB
10. 3.957 3.957 ↓ 1.2 2,636 1

Seq Scan on "OrderPosDO" op (cost=0.00..190.97 rows=2,111 width=8) (actual time=0.012..3.957 rows=2,636 loops=1)

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