Re: Hash partitioning.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Claudio Freire <klaussfreire(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Yuri Levinsky <yuril(at)celltick(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Browne <cbbrowne(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Mailing Lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash partitioning.
Date: 2013-06-27 21:20:51
Message-ID: CAMkU=1yFnDV3qSH2PejLkjP6SBozjpTceOYD6a8c9TuzfAdoTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 26, 2013 at 11:14 AM, Claudio Freire <klaussfreire(at)gmail(dot)com>wrote:

>
> Now I just have two indices. One that indexes only hot tuples, it's
> very heavily queried and works blazingly fast, and one that indexes by
> (hotness, key). I include the hotness value on the query, and still
> works quite fast enough. Luckily, I know things become cold after an
> update to mark them cold, so I can do that. I included hotness on the
> index to cluster updates on the hot part of the index, but I could
> have just used a regular index and paid a small price on the updates.
>
Indeed, for a while it worked without the hotness, and there was no
> significant trouble. I later found out that WAL bandwidth was
> noticeably decreased when I added that hotness column, so I did, helps
> a bit with replication. Has worked ever since.
>

I'm surprised that clustering updates into the hot part of the index,
without also clustering them it into a hot part of the table heap, works
well enough to make a difference. Does clustering in the table just come
naturally under your usage patterns?

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-06-27 21:23:52 Re: checking variadic "any" argument in parser - should be array
Previous Message Jeff Janes 2013-06-27 21:13:02 Re: Hash partitioning.