Re: Performance issue with cross table updates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance issue with cross table updates
Дата
Msg-id 27226.1347300710@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Performance issue with cross table updates  (Craig Gibson <craiggib@gmail.com>)
Список pgsql-general
Craig Gibson <craiggib@gmail.com> writes:
> I get a daily CSV file of 6.5 million records. I create a temporary
> table and COPY them in. On completion I create an index on the mdnid
> column. This column is also indexed in table 2. This part is very
> fast. I had some 'checkpoint too often' issues, but that I have
> resolved.

FWIW, you probably should also issue an ANALYZE on the temp table after
you've loaded it.  If you skip that, the planner is working blind as to
column statistics and is quite likely to choose inappropriate plans.

I concur with the other comment that you might be able to make this a
lot faster if you could convert it into a couple of multiple-row
commands instead of doing a manual loop.  But you'd need up-to-date
statistics to get a decent plan for that, too ...

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Performance issue with cross table updates
Следующее
От: Edson Richter
Дата:
Сообщение: Compressed binary field