cancel
Showing results for 
Search instead for 
Did you mean: 

literal autoparam for cached statements misses "like" strings in where clauses?

sladebe
Active Participant
0 Kudos

For ASE 16.0 SP04 PL04 on Linux, with "enable literal autoparam"=1 and the statement cache active (size!=0), when I run a query with a "like" clause, the string for the like clause is not converted to a generic parameter.

For example, when I run

select * from sysdatabases where name="master";<br>

I get the expected entry in monCachedStatement with the generic string for the param value:

> select sql_text=show_cached_text(SSQLID) from monCachedStatement where SSQLID=1086948959; -mvert
sql_text: select * from sysdatabases where name=@@@V0_VCHAR1(@@@V0_VCHAR1 VARCHAR(64)) <br>

But if I run the query with a "like" clause, the string for the like clause is not converted to a generic parameter:

> select sql_text=show_cached_text(SSQLID) from monCachedStatement where SSQLID=1118949073; -mvert
sql_text: select * from sysdatabases where name like "master"<br>

Looking in the Controlling Literal Parameterization doc page, I don't see anything about "like" clauses being excluded.

Is there some other setting controlling this? Or is this a problem worth reporting?

Thanks in advance
Ben

View Entire Topic
bart_van_kuijk
Participant

I have made a comment on the page you refer to requesting inclusion of statement on 'like' not being part of this.

sladebe
Active Participant
0 Kudos

Thanks very much