Re: pgsql vs mysql

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Guido Neitzer" <guido(dot)neitzer(at)pharmaline(dot)de>
Cc: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgsql vs mysql
Date: 2006-07-11 19:31:23
Message-ID: b42b73150607111231m39e4d2d2pa74650d4207a5a15@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/11/06, Guido Neitzer <guido(dot)neitzer(at)pharmaline(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message marcelo Cortez 2006-07-11 19:36:30 Re: encoding bug or feature?
Previous Message Tom Lane 2006-07-11 19:17:32 Re: troubleshooting 8.1.2