Search Postgresql Archives

Re: Estimated rows question

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

 



[ sorry for slow response, but I'd not gotten time to think about this... ]

Sam Ross <elliptic@xxxxxxxxx> writes:
> I was wondering why it seems that the query planner can't "see", based
> on the histograms, that two join-columns have a very small
> intersection, and adjust its row estimation accordingly.

The reason why not is that eqjoinsel() doesn't take any such
consideration into account.  It's possible that it'd be a good idea
to teach it to do so.  I'm not entirely convinced though.  It would
add a fair amount of expense to that function, as well as adding
some possibly shaky assumptions, and I'm not sure how often we'd
get a usefully-better estimate in practice.  OTOH, there are a lot
of shaky assumptions in eqjoinsel() already, and we did decide this
was worth worrying about in mergejoin cost estimation.

Do you want to try it and submit a patch for testing?

			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