Re: selects from large tables
От | Tom Lane |
---|---|
Тема | Re: selects from large tables |
Дата | |
Msg-id | 1453.1037805402@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: selects from large tables (Nikk Anderson <Nikk.Anderson@parallel.ltd.uk>) |
Список | pgsql-performance |
Nikk Anderson <Nikk.Anderson@parallel.ltd.uk> writes: > As our backend systems are writing hundreds of rows of data in per minute > into the table that needs clustering - will cluster handle locking the > tables when dropping the old, and renaming the clustered data? What happens > to the data being added to the table while cluster is running? Nothing, because there won't be any: cluster acquires exclusive lock on the table while it runs. Any would-be inserter will block till it's done. If you are clustering by timestamp of insertion, and you never update or delete rows, then I think it's a one-time-and-you're-done kind of task anyway --- newly inserted rows will always get added at the end, and so will be in timestamp order anyway. But if you need to update the table then things aren't so nice :-( regards, tom lane PS: it's not really necessary to quote the entire thread in every message, and it's definitely not nice to do so twice in both plain text and HTML :-(. Please have some consideration for the size of your emails that Marc is archiving for posterity ...
В списке pgsql-performance по дате отправления: