Re: BUG #6136: Perfomance dies when using PK on 64-bit field

From: Robert Ayrapetyan <robert(dot)ayrapetyan(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6136: Perfomance dies when using PK on 64-bit field
Date: 2011-08-01 08:49:28
Message-ID: CAAboi9vrFh2QOAAvnYPrXDUJRxNVAy6AQtPMzujCFRfZh-RVRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi.

My simple testcase is:

> Testcase may be as simple as:
>
> CREATE TABLESPACE tblsp_ix LOCATION '/some_dedicated_hdd'
>
> CREATE TABLE tp_req
> (
> id bigint PRIMARY KEY USING INDEX TABLESPACE tblsp_ix,
> arrived timestamp NOT NULL,
> real_ip inet,
> tp_id integer NOT NULL,
> action_id smallint NOT NULL,
> subject_id smallint NOT NULL
> );
> CREATE INDEX ix_tp_req ON trafd.tp_req
> USING btree (arrived, tp_id, action_id, subject_id) TABLESPACE tblsp_ix;
>
> Then generate ~500 files every ~7-10Mb in size (every file contains
> 80k-100k rows)
> with specified columns.
>
> Copy them to table one by one in cycle:
> psql -d fake_db -c "COPY tp_req(id, arrived, real_ip, tp_id,
> action_id, subject_id) FROM '${f}'"
>
> Filesystem on tblsp_ix is ufs2.

To your question - I've tried to drop ix_tp_req alone leaving PK in
place - situation was same.
Only dropping PK helps.

On Mon, Aug 1, 2011 at 11:10 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Hi,
>
> What happens if you drop other indices with a similar size before starting the
> copy? It might just be the additional io-load (causing more checkpoints, more
> random io, etc) is causing the problems.
>
> Could you share your config and hw info?
>
> Greetings,
>
> Andres
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Dragojlovic 2011-08-01 10:35:46 BUG #6138: Install failed
Previous Message Andres Freund 2011-08-01 08:10:32 Re: BUG #6136: Perfomance dies when using PK on 64-bit field