Subject Re: [IB-Architect] Classic vs SuperServer was IB/FB Lock manager failures
Author David Jencks
On 2002.09.19 13:46:55 -0400 Paul Schmidt wrote:
<snip>

> I wonder though if nearly identical, really are identical, for example
> the following two
> are actually identical.
>
> SELECT ZNOG_ID FROM ZNOG WHERE ZNOG_ID = 23456
> SELECT ZNOG_ID FROM ZNOG WHERE ZNOG_ID = 23457
>
> Now you might gain a lot by doing a substitution, where the above both
> get stored
> and compared as:
>
> SELECT ZNOG_ID FROM ZNOG WHERE ZNOG_ID = ?
>
> However at some point the SQL gets complex enough that it needs to store
> them as
> they are, and possibly even give up trying to cache a big complex
> statement, but
> those are the statements that could benefit the most from not having to
> re-compile
> ad nausium.

Shouldn't the db user be using prepared statements in this case? The engine
shouldn't do any guessing about this IMO. Just cache the string as
supplied by the user. SQL code generators ought to be able to produce
reproducible sql strings.

david jencks