Re: WAL + SSD = slow inserts?

Поиск
Список
Период
Сортировка
От Skarsol
Тема Re: WAL + SSD = slow inserts?
Дата
Msg-id CAMt8e=GPCAss1ft-aW0W5CvMORTp95Pyzw9OcVbEUjtKHCS4bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL + SSD = slow inserts?  (bricklen <bricklen@gmail.com>)
Ответы Re: WAL + SSD = slow inserts?  (Rosser Schwarz <rosser.schwarz@gmail.com>)
Список pgsql-performance
On Thu, Dec 5, 2013 at 1:19 PM, bricklen <bricklen@gmail.com> wrote:

On Thu, Dec 5, 2013 at 10:08 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
Rules have a lot of overhead. Is there a reason you're not using
defaults or triggers?

Or for even less overhead, load the partitions directly, and preferably use "DEFAULT nextval('some_sequence')" as Scott mentioned.


The rule is being used to return the id of the insert, it's not part of the partitioning itself. The id is generated with default nextval. I've looked at using returning instead but that will require a large refactoring of the codebase and seems to have issues when combined with the partitioning. The partitioning is done with a BEFORE INSERT ON trigger. The trigger proc doesn't do any selects, it's just based on the contents of the insert itself.

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: One huge db vs many small dbs
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: One huge db vs many small dbs