Skip to Content
0
Aug 25, 2023 at 04:39 PM

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

126 Views Last edit Aug 25, 2023 at 05:15 PM 2 rev

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