Search Postgresql Archives

Re: PG choosing nested loop for set membership?

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

 



Brian Crowell <brian@xxxxxxxxxx> writes:
> Which says to me coalesce has a selectivity.

Well, the point is you're just getting a default selectivity estimate
for the "acc.rule_set_id = coalesce(...anything...)" condition.  The
planner is smarter about plain "x = y" join conditions: it looks up
the column stats for x and y and determines the probability of equality.

In principle I guess we could somehow merge the stats of y and z
when looking at a "coalesce(y, z)" expression, but I'm not sure
how that would work exactly.

			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