From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jose Vicente Nunez Z <josevnz(at)newbreak(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Inserting 26 million rows takes 8 hours, how to improve those times? |
Date: | 2003-09-16 15:40:51 |
Message-ID: | 17679.1063726851@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Jose Vicente Nunez Z <josevnz(at)newbreak(dot)com> writes:
> create table mytable
> (
> a varchar(20) not null,
> b varchar(20) not null,
> c varchar(20) not null,
> d char(6),
> f int null,
> g float not null,
> h float not null
> )
> recreating the original index takes forever:
> create index myindex on mytable ( a, b, c );
> For some reason i don't see much I/O but a lot of CPU ussage:
Hm. I'll bet that you are using a non-C locale, such that varchar
comparisons depend on strcoll() instead of strcmp(). strcoll can
be incredibly slow in some locales. Do you really need non-ASCII
sort order? If not, I'll bet that re-initdb'ing in C locale will
make a difference.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-09-16 16:04:27 | Re: Inserting 26 million rows takes 8 hours, how to |
Previous Message | Jose Vicente Nunez Z | 2003-09-16 15:27:46 | Re: Inserting 26 million rows takes 8 hours, how to |