Re: [HACKERS] A Better External Sort?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [HACKERS] A Better External Sort?
Дата
Msg-id 433C1C2D.7090908@agliodbs.com
обсуждение исходный текст
Ответ на Re: [HACKERS] A Better External Sort?  ("Jeffrey W. Baker" <jwbaker@acm.org>)
Ответы Re: [HACKERS] A Better External Sort?  ("Luke Lonergan" <llonergan@greenplum.com>)
Re: [HACKERS] A Better External Sort?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Jeff, Ron,

First off, Jeff, please take it easy.  We're discussing 8.2 features at
this point and there's no reason to get stressed out at Ron.  You can
get plenty stressed out when 8.2 is near feature freeze.  ;-)


Regarding use cases for better sorts:

The biggest single area where I see PostgreSQL external sort sucking is
  on index creation on large tables.   For example, for free version of
TPCH, it takes only 1.5 hours to load a 60GB Lineitem table on OSDL's
hardware, but over 3 hours to create each index on that table.  This
means that over all our load into TPCH takes 4 times as long to create
the indexes as it did to bulk load the data.

Anyone restoring a large database from pg_dump is in the same situation.
  Even worse, if you have to create a new index on a large table on a
production database in use, because the I/O from the index creation
swamps everything.

Following an index creation, we see that 95% of the time required is the
external sort, which averages 2mb/s.  This is with seperate drives for
the WAL, the pg_tmp, the table and the index.  I've confirmed that
increasing work_mem beyond a small minimum (around 128mb) had no benefit
on the overall index creation speed.


--Josh Berkus



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

Предыдущее
От: PFC
Дата:
Сообщение: Re: Comparative performance
Следующее
От: "Luke Lonergan"
Дата:
Сообщение: Re: [HACKERS] A Better External Sort?