Re: COPY FROM STDIN instead of INSERT

Поиск
Список
Период
Сортировка
Искать
От
Shane Ambler
Тема
Re: COPY FROM STDIN instead of INSERT
Дата
Msg-id
453618B8.1060302@007Marketing.com
Ответ на
Список
Дерево обсуждения
COPY FROM STDIN instead of INSERT "Ilja Golshtein" <ilejn@yandex.ru>
Re: COPY FROM STDIN instead of INSERT Shane Ambler <pgsql@007Marketing.com>
Re: COPY FROM STDIN instead of INSERT "Ilja Golshtein" <ilejn@yandex.ru>
Re: COPY FROM STDIN instead of INSERT Shane Ambler <pgsql@007Marketing.com>
Re: COPY FROM STDIN instead of INSERT "Ilja Golshtein" <ilejn@yandex.ru>
Re: COPY FROM STDIN instead of INSERT Martijn van Oosterhout <kleptog@svana.org>
Re: COPY FROM STDIN instead of INSERT "Ilja Golshtein" <ilejn@yandex.ru>
Re: COPY FROM STDIN instead of INSERT "Merlin Moncure" <mmoncure@gmail.com>
Re: COPY FROM STDIN instead of INSERT Ron Johnson <ron.l.johnson@cox.net>
Re: COPY FROM STDIN instead of INSERT "Merlin Moncure" <mmoncure@gmail.com>
Re: COPY FROM STDIN instead of INSERT Ron Johnson <ron.l.johnson@cox.net>
Re: COPY FROM STDIN instead of INSERT Alvaro Herrera <alvherre@commandprompt.com>
Re: COPY FROM STDIN instead of INSERT "Merlin Moncure" <mmoncure@gmail.com>
Re: COPY FROM STDIN instead of INSERT Shane Ambler <pgsql@007Marketing.com>
Re: COPY FROM STDIN instead of INSERT Casey Duncan <casey@pandora.com>
Re: COPY FROM STDIN instead of INSERT "Ilja Golshtein" <ilejn@yandex.ru>
Re: COPY FROM STDIN instead of INSERT "Merlin Moncure" <mmoncure@gmail.com>
Ilja Golshtein wrote:

>> Sounds like your working with an existing database - if you are starting 
>>from scratch (inserting data into an empty database) then there are 
>> other things that can help too.
> 
> I am working with existing database, though I am interested what "other things" you mean.
> 
Basically when adding data to a table some of the time spent inserting 
is spent updating indexes.

When starting a database from scratch it is much faster to import the 
data and then create the indexes. The time to create index on a full 
table is less than the extra time from each index update from the 
inserts. The more indexes to update the more time updating indexes takes.

The problem with a live database is removing the indexes slows down 
current users and if you are adding 2,000 rows to a table that already 
has 5,000,000 rows in it then you will loose the benefit.


-- 

Shane Ambler
Postgres@007Marketing.com

Get Sheeky @ http://Sheeky.Biz
В списке pgsql-general по дате отправления
От: Magnus Hagander
Дата:
От: Bill Moran
Дата:
FAQ