Re: Optimizer issue -- bad query plan?

From: Moshe Jacobson <moshe(at)neadwerx(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Optimizer issue -- bad query plan?
Date: 2014-06-05 22:35:01
Message-ID: CAJ4CxLm94R65bRbmq4x+XvGf3PUCPTvd6dGYu+aLtBSZzMWgog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 5, 2014 at 6:09 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> why would you join 28 tables you're not using ??
>

The query is derived from a view. I want to select only one column from a
view with many columns. I figured the optimizer would be smart enough in
this case not to join all of the tables needed for the columns I wasn't
referencing at all.

I thought it might be that postgres couldn't optimize the query due to the
fact that it was a view, so that's why I pulled out this portion to see if
it would speed up. But it didn't.

Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc. <http://www.neadwerx.com>
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339

"Quality is not an act, it is a habit." -- Aristotle

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-06-05 22:38:31 Re: Optimizer issue -- bad query plan?
Previous Message John R Pierce 2014-06-05 22:09:44 Re: Optimizer issue -- bad query plan?