BUG #1753: Query Optimizer does not work well with libpg / PQexecParams

From: "Ernst Bachmann" <e(dot)bachmann(at)xebec(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1753: Query Optimizer does not work well with libpg / PQexecParams
Date: 2005-07-05 09:09:06
Message-ID: 20050705090906.3DC5CF0B0E@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1753
Logged by: Ernst Bachmann
Email address: e(dot)bachmann(at)xebec(dot)de
PostgreSQL version: 8.0.3
Operating system: Linux
Description: Query Optimizer does not work well with libpg /
PQexecParams
Details:

It looks like the query optimizer isn't taking the value of parameters sent
with PQexecParams into account, thus generating (in my case, very) unoptimal
plans

There is a warning about that for "PREPARE", but with PQexecParams, the
parameter values should be available immediatly for the planner.

Sending the parameters inline in the SQL query string solved the problem for
me (Query executes in 5 ms instead of 500+), but thats obviously not my
favorite solution.

Is this something planned to be fixed, otherwise a warning in the libpq
documentation about "PQexecParams" being potentially slow would be nice.

Thanks
/Ernst

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ramzi 2005-07-05 13:06:58 BUG #1754: Abou the pg_stat_activity
Previous Message Hans Olav Eggestad 2005-07-04 22:05:06 extract epoch bug