Re: Why could different data in a table be processed with different performance?

2018-09-22 Thread didier
Hi, Assuming DB is quiescent. And if you run? select count(*) from articles where article_id between %s and %s ie without reading json, is your buffers hit count increasing? 20 000 8K blocks *2 is 500MB , should be in RAM after the first run. Fast: read=710 I/O Timings: read=852.547 ==> 1.3 ms

Re: Multi-second pauses blocking even trivial activity

2018-09-22 Thread Andreas Kretschmer
Am 21.09.2018 um 21:07 schrieb Patrick Molgaard: Andreas -- just following up to say that this was indeed the root cause. Thanks again. glad i could help you. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com

Re: Why could different data in a table be processed with different performance?

2018-09-22 Thread Vladimir Ryabtsev
> I think reindex will improve the heap access..and maybe the index access too. I don't see why it would be bloated without UPDATE/DELETE, but you could check to see if its size changes significantly after reindex. I tried REINDEX, and size of PK index changed from 2579 to 1548 MB. But test don't s

Re: Why could different data in a table be processed with different performance?

2018-09-22 Thread Vladimir Ryabtsev
> is the length of the text equally distributed over the 2 partitions? Not 100% equally, but to me it does not seem to be a big deal... Considering the ranges independently: First range: ~70% < 10 KB, ~25% for 10-20 KB, ~3% for 20-30 KB, everything else is less than 1% (with 10 KB steps). Second ra