On Thu, 2 Jan 2003, Hilmar Lapp wrote:
> I have a query generated by an application (not mine, but there's
> nothing I can find that looks bad about the query itself) that takes an
> excessive amount of time to return even though there are almost no rows
> in the schema yet. 3 secs may not seem to be much, but the query is run
> by a web-application for a page you have to go through quite
> frequently, and it appears the query should be able to execute below 1
> sec easily. I'm running Postgres 7.3.1 on Mac OSX.
>
Hmm.. This won't fix the fact the planner takes three seconds, but since
it is a web application have you tried using PREPARE/EXECUTE so it only
needs to be planned once? (Unless I am mistaken about what prepare/execute
actually do) that way only the first visitor gets the hit..
------------------------------------------------------------------------------
Jeff Trout <jeff@jefftrout.com> http://www.jefftrout.com/
Ronald McDonald, with the help of cheese soup,
controls America from a secret volkswagon hidden in the past
-------------------------------------------------------------------------------