From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-performance@postgresql.org
Subject: Re: bad execution plan for subselects containing windowing-function
Date: Thu, 14 Jan 2010 18:30:25 +0100
Message-ID: <20100114173025.GA8675@tux> (raw)
In-Reply-To: <25448.1263489336@sss.pgh.pa.us>
References: <20100114170318.GA7634@tux>
<25448.1263489336@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andreas Kretschmer <akretschmer@spamfence.net> writes:
> > No question, this is a silly query, but the problem is the 2nd query: it
> > is obviously not possible for the planner to put the where-condition
> > into the subquery.
>
> Well, yeah: it might change the results of the window functions.
> I see no bug here. Your second query asks for a much more complicated
> computation, it's not surprising it takes longer.
Thank you for the fast answer.
But sorry, I disagree. It is the same query with the same result. I can't see
how the queries should return different results.
What have i overlooked?
tia, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: akretschmer@spamfence.net
Subject: Re: bad execution plan for subselects containing windowing-function
In-Reply-To: <20100114173025.GA8675@tux>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox