Re: Planner statistics, correlations
От
Heikki Linnakangas
Тема
Re: Planner statistics, correlations
Дата
Msg-id
45A7692C.2080106@enterprisedb.com
Ответ на
Re: Planner statistics, correlations (Tobias Brox)
Список
Дерево обсуждения
Planner statistics, correlations Tobias Brox <tobias@nordicbet.com>
Re: Planner statistics, correlations "Peter Childs" <peterachilds@gmail.com>
Re: Planner statistics, correlations Tobias Brox <tobias@nordicbet.com>
Re: Planner statistics, correlations Richard Huxton <dev@archonet.com>
Re: Planner statistics, correlations Tobias Brox <tobias@nordicbet.com>
Re: Planner statistics, correlations Heikki Linnakangas <heikki@enterprisedb.com>
Re: Planner statistics, correlations Tobias Brox <tobias@nordicbet.com>
Re: Planner statistics, correlations Heikki Linnakangas <heikki@enterprisedb.com>
Tobias Brox wrote: > [Heikki Linnakangas - Fri at 10:41:34AM +0000] >> I thought about partitioning the table by state, putting rows with >> state=4 into one partition, and all others to another partition. > > That sounds like a good idea - but wouldn't that be costly when changing state? In PostgreSQL, UPDATE internally inserts a new row and marks the old one as deleted, so there shouldn't be much of a performance difference. I'm not very familiar with our partitioning support, so I'm not sure if there's any problems with an update moving a row from one partition to another. I think you'll have to create an INSTEAD OF UPDATE rule to do a DELETE on one partition and an INSERT on the other partition. Depending on your application, that might be a problem; UPDATE is different from DELETE+INSERT from transaction isolation point of view. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-performance по дате отправления