On Mon, 31 Jan 2005 14:40:08 -0500, Tom Lane <[EMAIL PROTECTED]> wrote:
>Manfred Koizar <[EMAIL PROTECTED]> writes:
>> That's not what I meant.  I tried to say that if we have a GROUP BY
>> several columns and one of these columns alone has more than N/10
>> distinct values, there's no way to get less than that many groups.
>
>Oh, I see, you want a "max" calculation in there too.  Seems reasonable.
>Any objections?

Yes.  :-(  What I said is only true in the absence of any WHERE clause
(or join).  Otherwise the same cross-column correlation issues you tried
to work around with the N/10 clamping might come back through the
backdoor.  I'm not sure whether coding for such a narrow use case is
worth the trouble.  Forget my idea.

Servus
 Manfred

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to