planner and simple vs. complex statement was: example query for postgresql - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject planner and simple vs. complex statement was: example query for postgresql
Date
Msg-id 20080120131039.517dd09c@webthatworks.it
Whole thread Raw
In response to Re: example query for postgresql  (Sim Zacks <sim@compulab.co.il>)
Responses Re: planner and simple vs. complex statement was: example query for postgresql
List pgsql-general
On Sun, 20 Jan 2008 09:30:11 +0200
Sim Zacks <sim@compulab.co.il> wrote:

> I've found that multiple simple statements often work faster then
> convoluted single statements.

I don't want to steal any further time to anyone considering my
interest now is just academic since I can't handle any more
information I could put into action shortly... but still is there a
good reason that several simple statement could run faster than a
more complex one?

Is the planner able to correlate nearby simple statements?
I'd think that a more complex statement gives more clues on what's
your target to the planner that can then find a better way to
achieve it.
And yeah... on more complex statement the human can make things
worse, writing unnecessary complex sql.


--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: Clodoaldo
Date:
Subject: Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?