Re: Querying a time range across multiple partitions
| От | John R Pierce |
|---|---|
| Тема | Re: Querying a time range across multiple partitions |
| Дата | |
| Msg-id | 540E16BA.90004@hogranch.com обсуждение исходный текст |
| Ответ на | Re: Querying a time range across multiple partitions (Andreas Brandl <ml@3.141592654.de>) |
| Список | pgsql-general |
On 9/8/2014 1:40 PM, Andreas Brandl wrote: > can you explain that further? In the end, that argument sounds like it would always be more efficient to use a single tableand its index instead, rather than partitioning it (log(N) < c*log(N/c) for any c > 1, if I'm not totally lost today). it indeed would. good reasons for partitioning include... * efficient date based bulk deletion (we have a very large table that has 6 months retention, so we partition by week and delete the oldest week when a new week starts... dropping a partition is far faster than deleting 20 million records by date) * needing to put data across several tablespaces - I haven't had to do this. * more efficient vacuuming - really really large tables, like 100 GB, take a LONG time to vacuum. sane sized partitions will vacuum in less time, and since older time-based partitions aren't typically updated, they can be frozen. -- john r pierce 37N 122W somewhere on the middle of the left coast
В списке pgsql-general по дате отправления: