| От | Richard Huxton |
|---|---|
| Тема | Re: most idiomatic way to "update or insert"? |
| Дата | |
| Msg-id | 41127EF1.70507@archonet.com обсуждение исходный текст |
| Ответ на | Re: most idiomatic way to "update or insert"? (Ron St-Pierre <rstpierre@syscor.com>) |
| Список | pgsql-general |
Ron St-Pierre wrote: > Okay, this simple example really exists, but the simple table also > includes a date that the stock was last traded, so we have: > stock symbol, stock exchange, high, low, open, close, volume, date, plus > a few more fields [snip more details] > BTW these updates do take longer than we'd like so I would appreciate > more input on how this setup could be redesigned. Well, I'd probably make the primary key (stock_id, trading_date) and just insert into a log table. From there I'd update into a summary table, or use a view. Of course, that might make things slower in your case. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера