Skip to Content
0
Jul 05, 2018 at 01:29 AM

[ASE] Comment processing in statement cache

99 Views

config ---------------------------
statement cache : on
literal autoparam : on

excute query --------------------
select * from logins where name = 'sa' -- id: 1234
select * from logins where name = 'sa' -- id: 5678

dbcc prsqlcache result ---------------------
SQL TEXT: select * from logins where name = @@@V0_VCHAR1 -- id: 5678
SQL TEXT: select * from logins where name = @@@V0_VCHAR1 -- id: 1234


A situation where the query plan can not be reused due to a different comment

Can I use the statement cache to exclude comments for query plan reuse????