Re: Inserting 26 million rows takes 8 hours, how to improve those times?
В списке pgsql-admin по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Inserting 26 million rows takes 8 hours, how to improve those times? |
| Дата | |
| Msg-id | 17679.1063726851@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Inserting 26 million rows takes 8 hours, how to (Jose Vicente Nunez Z <josevnz@newbreak.com>) |
| Список | pgsql-admin |
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
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера