Re: pgsql vs mysql

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: pgsql vs mysql
Дата
Msg-id b42b73150607111231m39e4d2d2pa74650d4207a5a15@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql vs mysql  (Guido Neitzer <guido.neitzer@pharmaline.de>)
Список pgsql-general
On 7/11/06, Guido Neitzer <guido.neitzer@pharmaline.de> wrote:
> On 11.07.2006, at 19:36 Uhr, Merlin Moncure wrote:
>
> > As to preparing
> > statements, I agree in principle although I don't know if that is a
> > good argument not to make the non-paramaterized interface more
> > powerful.
>
> It is not, as prepared statements have the problem that they are only
> optimized once and very generically and without actual knowledge of
> the parameter content, this is just useless.
>

there is some confusion (not necessarily by you) between paramaterized
and prepared statements.  parameterized is when the query parameters
are separate from the query string itself, you can do this with or
without preparing them.  parameterizing statements is  basically
always a good thing...you get something for nothing.

preparing can work great or not depending on what you are trying to
do.  If they work then can cut as much of 50% of the query time and if
they dont work...well you know what happens.  I can vouch for this,
for example I like to parameterize the limit clause but this can
confuse the planner.  Still, overall, when used carefully and
properly, they can supercharge your server.

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: marcelo Cortez
Дата:
Сообщение: Re: encoding bug or feature?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: troubleshooting 8.1.2