Re: Errors on CREATE TABLE IF NOT EXISTS

Поиск
Список
Период
Сортировка
От Matteo Beccati
Тема Re: Errors on CREATE TABLE IF NOT EXISTS
Дата
Msg-id 4FA16A02.10109@beccati.com
обсуждение исходный текст
Ответ на Re: Errors on CREATE TABLE IF NOT EXISTS  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
Hi Alvaro,

On 01/05/2012 21:36, Alvaro Herrera wrote:
> The question you were asking has already been answered, but I think it's
> worth pointing out that a partitioned-insert trigger that has to check
> whether the partition exist beforehand is a lot slower than one that
> doesn't have to.  Our usual suggestion is to create the partitions by
> some other means, e.g. create a couple months worth of weekly
> partitions, a couple of months ahead of time, via cron.  The insert
> trigger is then assured that the partition exists, and it can become
> faster by not having to check.

Thanks for the suggestion. I will surely follow the advice as soon as
the load starts to grow. For now catching the "table not found"
exception within the insert trigger and creating the table on the fly
seems a good balance between performance and ease of use.


Cheers
--
Matteo Beccati

Development & Consulting - http://www.beccati.com/

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

Предыдущее
От: stuart@stuartbishop.net
Дата:
Сообщение: BUG #6624: Tab completion of identifier containing single backslash triggers warnings
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #6624: Tab completion of identifier containing single backslash triggers warnings