Re: Table partitioning for maximum speed?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table partitioning for maximum speed?
Date: 2003-10-10 16:47:47
Message-ID: 20031010164747.GA29271@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please keep discussions on the list so that others may learn from or comment
on the suggested solutions.

On Fri, Oct 10, 2003 at 11:27:50 -0400,
Jeff Boes <jboes(at)nexcerpt(dot)com> wrote:
> Bruno Wolff III wrote:
>
> >On Thu, Oct 09, 2003 at 18:37:19 +0000,
> > Jeff Boes <jboes(at)nexcerpt(dot)com> wrote:
> >
> >
> >>
> >>The idea bandied about now is to partition this table into 16 (or 256,
> >>or ...) chunks by first digit (or 2, or ...). In the simplest case, this
> >>would mean:
> >>
> >>
> >
> >If there is an index on the checksum column, then you shouldn't get
> >much of a speed up by partitioning the data.
> >If you don't have an index on the checksum, it sounds like you should.
> >
> >
> Yes, the table has:
>
> Table "public.link_checksums"
> Column | Type | Modifiers
> ---------+---------------+-----------
> md5 | character(32) | not null
> link_id | integer | not null
> Indexes: ix_link_checksums_pk primary key btree (md5)

In that event I would expect that you might only save a few disk accesses
by having a btree with fewer levels.

If the query is slow, it might be doing a sequential search because of
a type mismatch. You can use explain to double check what plan is being
used.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2003-10-10 16:50:49 Re: Interfaces that support cursors
Previous Message Network Administrator 2003-10-10 16:43:04 Interfaces that support cursors