Re: Prepared statements considered harmful
От | Zeugswetter Andreas DCP SD |
---|---|
Тема | Re: Prepared statements considered harmful |
Дата | |
Msg-id | E1539E0ED7043848906A8FF995BDA579014DBE53@m0143.s-mxs.net обсуждение исходный текст |
Ответ на | Re: Prepared statements considered harmful (Lukas Kahwe Smith <smith@pooteeweet.org>) |
Список | pgsql-hackers |
> >>> I'd wish that we reconsider when and how prepared statements are > >>> used. The JDBC interface and PL/pgSQL are frequently noticed > >>> perpetrators, but the problem is really all over the place. > >> AFAIK those are the only two places where preparation is > the default > >> ... what else were you thinking of? > > > > Perl DBI (DBD::Pg) defaults to prepared plans when connecting to a > > version 8.0 or higher server. > > > > Or at least, that's the way I read the documentation. Yea, but if you close the statement or leave the scope of the statement variable the plan is gone. So it is doing exactly what I would expect. It is written $stmt->prepare('select 1') what else would you expect ? There are enough other functions to get a result without a plan sticking around, like $db->selectrow_array .... Andreas
В списке pgsql-hackers по дате отправления: