Jose Vicente Nunez Z <josevnz@newbreak.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