Can't this be solved with partitioning the bodyparts table?
On Thu, Nov 21, 2013 at 5:01 PM, Stephen R. van den Berg <[email protected]>wrote: > Stephen R. van den Berg wrote: > >Arnt Gulbrandsen wrote: > >>On Wed, Nov 20, 2013 at 12:54:22PM +0100, Stephen R. van den Berg wrote: > >>Given that large attachments account for a one-digit percentage of > >>space used, I find it difficult to believe that this makes a > >>worthwhile difference. Try this on your database: > >> select sum(bytes) from bodyparts where bytes > 10000000; > >>How many per cent of the total space does that report? > > That gave 3% on a 413GB DB total footprint (query took over 10 minutes). > Postgresql 9.1 currently. > > But I was considering externalising not at 10MB and larger, but rather > at 64KB and larger (or 128KB depending on statistics). > > To be more precise: > Total number of bodyparts: 9302288 > Number of bodyparts >64KB: 671593 > > I.e. by externalising the >64KB bodyparts, I keep 93% of all messages fully > in the DB, but I go from a 413GB total DB footprint to 59GB; which seems > significant and worthwhile. > -- > Stephen. > > -- Marc Dirix Computers Schmeddingstraat 24 6361AZ Nuth
