Search Postgresql Archives

Re: Avoiding duplication of code via views -- slower? How do people typically do this?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe Van Dyk <joe@xxxxxxxxx> writes:
> On Fri, Feb 15, 2013 at 7:43 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> Try without the useless "is true" bits.

> Huh, that did do the trick. Why does "is true" affect the plan?

Because "(x = y) IS TRUE" isn't the same as "x = y".  (The behavior for
nulls is different.)  And the planner only knows about using the latter
type of condition for indexscans.  Since you need it to convert the
end_at condition into an indexscan to get a fast plan, you lose.

It's conceivable that we could teach the planner about this case, but
I haven't seen enough people doing that to make me think it's worth the
code space and planner cycles.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux