| От | Anton Nikiforov |
|---|---|
| Тема | Insert Or update |
| Дата | |
| Msg-id | 40891EA5.9090504@nikiforov.ru обсуждение исходный текст |
| Ответы |
Re: Insert Or update
|
| Список | pgsql-general |
Dear All, I have a database which stores traffic data and to update the traffic for the particular IP i have to select this ip from the table for this period and if it is already in the database i should run an update statement, but if it is not presented - i should insert the data. It was OK when i have had 2-3 millions of records, but now it is 15 millions and i'm not complaining that it is too slow to select - no, but it takes some time anyway. I know that this will be helpful to write a function that will do this for me, but it will run the same time as my insertion tool that is written in c or even slower. So my question is: is it possible to have "UPDATE OR INSERT" statement in the PostgreSQL like it is possible in Oracle (as i heard but did not check it by myself yet)? Best regards, Anton
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера