Re: hash index improving v3

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Xiao Meng" <mx(dot)cogito(at)gmail(dot)com>
Cc: "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-patches(at)postgresql(dot)org, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: hash index improving v3
Date: 2008-09-06 05:49:05
Message-ID: 34d269d40809052249h59750f83v4b19a50d0555580@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

]

On Fri, Sep 5, 2008 at 2:21 PM, Alex Hunsaker <badalex(at)gmail(dot)com> wrote:
> Ok now that I made it so it actually *test* collisions, with the patch
> it always returns all rows that matched the hashed "key".

And here is the fix, we just forget to set the recheck flag for bitmap scans.

*** a/src/backend/access/hash/hash.c
--- b/src/backend/access/hash/hash.c
***************
*** 317,323 **** hashgetbitmap(PG_FUNCTION_ARGS)
/* Save tuple ID, and continue scanning */
if (add_tuple)
{
! tbm_add_tuples(tbm, &scan->xs_ctup.t_self, 1, false);
ntids++;
}

--- 317,323 ----
/* Save tuple ID, and continue scanning */
if (add_tuple)
{
! tbm_add_tuples(tbm, &scan->xs_ctup.t_self, 1, true);
ntids++;
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Asko Oja 2008-09-06 07:22:10 Re: reducing statistics write overhead
Previous Message Tom Lane 2008-09-06 05:28:38 Re: [PATCH] "\ef <function>" in psql

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-09-06 18:14:26 Re: hash index improving v3
Previous Message Alvaro Herrera 2008-09-05 20:59:36 Re: libpq events patch (with sgml docs)