Hello, as far as I know it is not done in JDBC, in many frameworks it
is.Although the execution plans cannot be reused it would be
somethingvery useful. It is included in a lot of frameworks and is a
recurrentquestion in database forums. It would be nice if it was
included in plain SQL.
Best regards.Alejandro Sánchez.
El lun, 01-03-2021 a las 15:31 +0100, Pavel Stehule escribió:
> Hi
> 
> po 1. 3. 2021 v 15:20 odesílatel Alejandro Sánchez <
> a...@nexttypes.com> napsal:
> > Hello, some improvements in the prepared statements would
> > facilitate
> > 
> > their use from applications:
> > 
> > 
> > 
> > - Use of table and column names in prepared statements.
> > 
> > 
> > 
> >     Example: select # from # where # = ?;
> > 
> > 
> > 
> > - Use of arrays in prepared statements.
> > 
> > 
> > 
> >     Example: select # from article where id in (?);
> > 
> > 
> > 
> >         # = author,title
> > 
> >         ? = 10,24,45
> 
> The server side prepared statements are based on reusing execution
> plans. You cannot reuse execution plans if you change table, or
> column. This is the reason why SQL identifiers are immutable in
> prepared statements. There are client side prepared statements - JDBC
> does it. There it is possible. But it is impossible on the server
> side. Prepared statements are like a compiled program. You can change
> parameters, variables - but you cannot change the program.
> 
> Regards
> Pavel
> 
> 
>  
> > 
> > Best regards.
> > 
> > Alejandro Sánchez.
> > 
> > 
> > 
> > 
> > 
> > 
> > 

Reply via email to