From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: GiST for range types (was Re: Range Types - typo + NULL string constructor) |
Date: | 2011-10-08 09:01:29 |
Message-ID: | 1318064489.1724.83.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2011-10-07 at 12:54 +0400, Alexander Korotkov wrote:
> The first thing caught my eye in existing GiST code is idea of
> subtype_float. float8 has limited precision and can't respresent, for
> example, varlena values good enough. Even if we have large int8 value
> we can loose lower bits, but data distribution can be so that these
> bits are valuable. Wouldn't it better to have function like
> subtype_diff_float which returns difference between two values of
> subtype as an float? Using of such function could make penalty more
> sensible to even small difference between values, and accordingly more
> relevant.
The reason I did it that way is for unbounded ranges. With
subtype_diff_float, it's difficult for the GiST code to differentiate
between [10,) and [100000,), because infinity minus anything is
infinity. But when inserting the range [100,200), the penalty for the
first one should be zero and the second one should have some positive
penalty, right?
Maybe we can still use subtype_diff_float by calling it on various pairs
of bounds to come up with a reasonable cost?
I'm open to suggestion. I'd just like to make sure that unbounded ranges
are a part of the consideration.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2011-10-08 12:59:45 | Re: pgsql: Cascading replication feature for streaming log-based replicatio |
Previous Message | Kohei KaiGai | 2011-10-08 07:11:08 | Re: [v9.2] Fix Leaky View Problem |