| От | Yan Cheng CHEOK |
|---|---|
| Тема | Fast Insert and Update (through COPY) |
| Дата | |
| Msg-id | 738974.76908.qm@web65715.mail.ac4.yahoo.com обсуждение исходный текст |
| Ответы |
Re: Fast Insert and Update (through COPY)
|
| Список | pgsql-general |
Previously, I am inserting a bulk of data by using the following way.
for each item
update item into table
if row count is 0
insert items into table
I realize I am suffering performance problem.
Later, I realize it is much fast by using
COPY
I am very happy with the speed.
Later, I realize that COPY doesn't work well, if I already have a row with same unique key. What I did is
# Try to remove old rows first
delete row where <condition>
# And perform really fast insertion
COPY
I was wondering, is this a common technique being use for fast bulk data insertion? Is there other techniques.
Thanks and Regards
Yan Cheng CHEOK
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера