Re: Performance die when COPYing to table with bigint PK

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Performance die when COPYing to table with bigint PK
Дата
Msg-id 4E37F07D020000250003F9A7@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Performance die when COPYing to table with bigint PK  (Robert Ayrapetyan <robert.ayrapetyan@comodo.com>)
Ответы Re: Performance die when COPYing to table with bigint PK
Список pgsql-performance
Robert Ayrapetyan <robert.ayrapetyan@comodo.com> wrote:

> So I'm still convinced - this bug relates to FreeBSD 64-bit + UFS
> + bigint column index
> (some of these may be superfluous, but I have no resources to
> check on different platforms with different filesystems).

Linux 64 bit XFS bigint column index only shows a slightly longer
run time for bigint versus int here.  What timings do you get for
the insert statements if you run the following in your environment?

create table bi (big bigint not null, medium int not null);
insert into bi with x(n) as (select generate_series(1, 1000000)
select n + 5000000000, n from x;
\timing on
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
create unique index bi_medium on bi (medium);
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
drop index bi_medium;
create unique index bi_big on bi (big);
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
truncate table bi; insert into bi with x(n) as (select
generate_series(1, 1000000)) select n + 5000000000, n from x;
\timing off
drop table bi;

Here's what I get:

Time: 1629.141 ms
Time: 1638.060 ms
Time: 1711.833 ms

Time: 4151.953 ms
Time: 4602.679 ms
Time: 5107.259 ms

Time: 4654.060 ms
Time: 5158.157 ms
Time: 5101.110 ms

-Kevin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Andreas Brandl
Дата:
Сообщение: Re: Array access performance
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Performance penalty when using WITH