Re: [GENERAL] tuple data size and compression

2016-12-16 Thread Tom DalPozzo
> Two questions: > > 1) Do you know what your data in the future is going to be? > > 2) Is a 100 byte bytea a realistic approximation of that data? > > wal_compression=off. >> >> -- > Adrian Klaver > adrian.kla...@aklaver.com Hi, 1) not precisely, but 10/100 million insertions per day. I can't k

Re: [GENERAL] tuple data size and compression

2016-12-16 Thread Adrian Klaver
On 12/16/2016 12:23 AM, Tom DalPozzo wrote: I see. But in my case rows don't reach that thresold (I didn't check if 2K but I didn't change anything). So I'm wondering if there is any other chance except the TOAST to get the rows compressed or not. Are

Re: [GENERAL] tuple data size and compression

2016-12-16 Thread Tom DalPozzo
> > I see. But in my case rows don't reach that thresold (I didn't check if >> 2K but I didn't change anything). So I'm wondering if there is any other >> chance except the TOAST to get the rows compressed or not. >> > > Are you really sure you want that? For small files the overhead of > compressi

Re: [GENERAL] tuple data size and compression

2016-12-15 Thread Adrian Klaver
On 12/15/2016 08:26 AM, Tom DalPozzo wrote: https://www.postgresql.org/docs/9.5/static/storage-toast.html "The TOAST management code is triggered only when a row value to be stored in a table is wider than T

Re: [GENERAL] tuple data size and compression

2016-12-15 Thread Tom DalPozzo
> > https://www.postgresql.org/docs/9.5/static/storage-toast.html >> > > "The TOAST management code is triggered only when a row value to be stored > in a table is wider than TOAST_TUPLE_THRESHOLD bytes (normally 2 kB). The > TOAST code will compress and/or move field values out-of-line until the r

Re: [GENERAL] tuple data size and compression

2016-12-15 Thread Adrian Klaver
On 12/15/2016 07:48 AM, Tom DalPozzo wrote: 2016-12-15 16:23 GMT+01:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>>: On 12/15/2016 07:17 AM, Tom DalPozzo wrote: Hi, it's not clear to me when tuple data (max 1000 bytes total) get compressed o

Re: [GENERAL] tuple data size and compression

2016-12-15 Thread Tom DalPozzo
2016-12-15 16:23 GMT+01:00 Adrian Klaver : > On 12/15/2016 07:17 AM, Tom DalPozzo wrote: Hi, > > it's not clear to me when tuple data (max 1000 bytes total) get > > compressed on disk and when not. > > I tried with pg_column_size to find the tuple's size but I get ambiguous > > results. > > > Wha

Re: [GENERAL] tuple data size and compression

2016-12-15 Thread Adrian Klaver
On 12/15/2016 07:17 AM, Tom DalPozzo wrote: Hi, it's not clear to me when tuple data (max 1000 bytes total) get compressed on disk and when not. I tried with pg_column_size to find the tuple's size but I get ambiguous results. What is the table definition? Maybe this will help?: https://www.p