Re: [HACKERS] Fix for GiST penalty

2011-05-31 Thread Heikki Linnakangas
On 31.05.2011 01:07, Alexander Korotkov wrote: In gist_box_penalty function floating point error in line *result = (float) (size_box(ud) - size_box(origentry-key)); sometimes makes *result a very small negative number. I beleive that best place to fix it is gistpenalty function. The attached

Re: [HACKERS] Fix for GiST penalty

2011-05-31 Thread Alexander Korotkov
On Tue, May 31, 2011 at 12:06 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: The documentation should be fixed too. Patch with documentation fix is attached. I tried to reproduce this problem on another computer with Windows, but problem doesn't occurs. So, seems that it

Re: [HACKERS] Fix for GiST penalty

2011-05-31 Thread Tom Lane
Alexander Korotkov aekorot...@gmail.com writes: On Tue, May 31, 2011 at 12:06 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: The documentation should be fixed too. Patch with documentation fix is attached. Applied, thanks. I threw in an isnan() test too, just to be

[HACKERS] Fix for GiST penalty

2011-05-30 Thread Alexander Korotkov
Hi! During my work on GSoC project, I found bad perfomace of GiST for point datatype. It appears even on uniform random data. test=# create table test as (select point(random(), random()) from generate_series(1, 100)); SELECT 100 test=# create index test_idx on test using gist(point);