Re: Performance of ByteA: ascii vs binary

2019-04-10 Thread Олег Самойлов
Just theoretically assumption. PostgreSQL sometimes may optimise internal format of data and can sometimes zip data. ASCII data can be zipped better, then binary random data. Also PostgreSQL sometimes take decision to keep a column in an external file, if the column is still too big after zip. I

Re: Performance of ByteA: ascii vs binary

2019-03-21 Thread Adrian Klaver
On 3/21/19 6:49 AM, Tom Lane wrote: "Peter J. Holzer" writes: On 2019-03-20 13:20:57 +0100, Thomas Güttler wrote: Strange. I saw a big difference. What did you test? I tested inserts. The graph with the quantiles was for selects. Hmm, so there are two different code paths being considered

Re: Performance of ByteA: ascii vs binary

2019-03-21 Thread Tom Lane
"Peter J. Holzer" writes: > On 2019-03-20 13:20:57 +0100, Thomas Güttler wrote: >> Strange. I saw a big difference. >> What did you test? >> I tested inserts. > The graph with the quantiles was for selects. Hmm, so there are two different code paths being considered here -- the OP is apparently

Re: Performance of ByteA: ascii vs binary

2019-03-21 Thread Peter J. Holzer
On 2019-03-20 13:20:57 +0100, Thomas Güttler wrote: > > > Am 19.03.19 um 20:37 schrieb Peter J. Holzer: > > On 2019-03-18 15:33:17 +0100, Thomas Güttler wrote: > > > I did some benchmarking and in my setup there was major > > > performance difference. > > > > > > I tested a ByteA column. > > >

Re: Performance of ByteA: ascii vs binary

2019-03-20 Thread Thomas Güttler
Am 19.03.19 um 20:37 schrieb Peter J. Holzer: On 2019-03-18 15:33:17 +0100, Thomas Güttler wrote: I did some benchmarking and in my setup there was major performance difference. I tested a ByteA column. If I used ascii data the tests took 52 seconds. If I used random binary data the test to

Re: Performance of ByteA: ascii vs binary

2019-03-19 Thread Peter J. Holzer
On 2019-03-18 15:33:17 +0100, Thomas Güttler wrote: > I did some benchmarking and in my setup there was major > performance difference. > > I tested a ByteA column. > > If I used ascii data the tests took 52 seconds. > If I used random binary data the test took 250 seconds. > > binary data is (r

Re: Performance of ByteA: ascii vs binary

2019-03-18 Thread Tom Lane
Adrian Klaver writes: > On 3/18/19 7:33 AM, Thomas Güttler wrote: >> If I used ascii data the tests took 52 seconds. >> If I used random binary data the test took 250 seconds. This doesn't seem terribly surprising in bytea_output = escape mode. Probably with bytea_output = hex the performance wo

Re: Performance of ByteA: ascii vs binary

2019-03-18 Thread Adrian Klaver
On 3/18/19 7:33 AM, Thomas Güttler wrote: I did some benchmarking and in my setup there was major performance difference. I tested a ByteA column. What was the test? If I used ascii data the tests took 52 seconds. If I used random binary data the test took 250 seconds. binary data is (roug