Re: Optimizer issue -- bad query plan?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizer issue -- bad query plan?
Дата
Msg-id 26950.1402010374@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimizer issue -- bad query plan?  (Moshe Jacobson <moshe@neadwerx.com>)
Ответы Re: Optimizer issue -- bad query plan?
Список pgsql-general
Moshe Jacobson <moshe@neadwerx.com> writes:
> On Thu, Jun 5, 2014 at 6:38 PM, David G Johnston <david.g.johnston@gmail.com
>> wrote:
>> Without definitions of all the tables involved, as well as knowing what
>> version you are running this query on, it is impossible to explain why.

> Right, I'm aware of this feature -- I'm just curious why it's not working!

So are we, but you've not provided a self-contained example.

I suspect that there's something you haven't shown us that means that the
view subquery doesn't get flattened into the calling query, so that the
planner won't be aware while planning the subquery that not all its output
columns are actually used.  But that's just a guess unsupported by
evidence.  We need to see the actual view definition and calling query,
not a simplified "equivalent" query.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Moshe Jacobson
Дата:
Сообщение: Re: Optimizer issue -- bad query plan?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: PostgreSQL 9.2.4 + CentOS 6.5 64 bit - segfault error in initdb