Re: Performance die when COPYing to table with bigint PK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Ayrapetyan <robert.ayrapetyan@xxxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux