Symptom
- Table scan (or a suboptimal index scan if it exists) may be chosen if a local variable is used as a search argument like below.
declare @col1 int
select @col1 = 10
select * from test1 where col1 = @col1
- As a result, the query performance slows down.
Read more...
Environment
- SAP Adaptive Server Enterprise (ASE) 15.x
- SAP Adaptive Server Enterprise (ASE) 16.0
Product
SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0 ; Sybase Adaptive Server Enterprise 15.0 ; Sybase Adaptive Server Enterprise 15.5
Keywords
slow, drop, performance, local variable, tablescan, indexscan, "statement cache" , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview