Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction.
В списке pgsql-general по дате отправления:
| От | Gerald Timothy Quimpo |
|---|---|
| Тема | Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction. |
| Дата | |
| Msg-id | 1202781789.12443.17.camel@localhost обсуждение исходный текст |
| Ответ на | Re: Continual uptime while loading data ... COPY vs INSERTS within a transaction. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On Sat, 2008-02-09 at 19:27 -0500, Tom Lane wrote: > Benjamin Arai <me@benjaminarai.com> writes: > > We are thinking of modifying our system to use COPY to replace these > > large INSERT transactions but we are concerned that it will greatly > > impact the user experience (i.e., exclusively lock the table during the > > copy process). First, does COPY grab an exclusive lock? Second, is > > there a better way to load data? > > No, and no. Use COPY. Unless inserting into a table that has rules and those rules need to fire. I think I saw a post (by you, Tom) that said COPY doesn't fire rules (haven't read the 8.3 release notes yet though, if COPY fires rules in 8.3 that'd be great, I'd love to use copy for pushing rows into the base table and having the rules fire so the right data goes into the right "inherits" descendant tables). tiger
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера