Re: Table UPDATE is too slow
От | Matt Clark |
---|---|
Тема | Re: Table UPDATE is too slow |
Дата | |
Msg-id | 001601c48f8c$b4738700$8300a8c0@solent обсуждение исходный текст |
Ответ на | Re: Table UPDATE is too slow (Ron St-Pierre <rstpierre@syscor.com>) |
Список | pgsql-performance |
> >That looks like poor database normalization, really. Are you > sure you > >don't want to split this into multiple tables instead of having 62 > >columns? > > > No, it is properly normalized. The data in this table is stock > fundamentals, stuff like 52 week high, ex-dividend date, etc, etc. Hmm, the two examples you gave there are actually ripe for breaking out into another table. It's not quite 'normalisation', but if you have data that changes very rarely, why not group it into a separate table? You could have the highly volatile data in one table, the semi-volatile stuff in another, and the pretty static stuff in a third. Looked at another way, if you have sets of fields that tend to change together, group them into tables together. That way you will radically reduce the number of indexes that are affected by each update. But as someone else pointed out, you should at the very least wrap your updates in a big transaction. M
В списке pgsql-performance по дате отправления: