Re: neither CPU nor IO bound, but throttled performance

2019-02-20 Thread Justin Pryzby
On Wed, Feb 20, 2019 at 06:32:49PM -0500, Gunther wrote: > Hi, I have an Amazon Linux based Postgresql 11 server here on a t2.medium > EC2 instance. > > Everything flows quite nicely. Except, I don't understand why I can't max > out the CPU or the IO, instead, IO is almost negligible yet the CPU

Re: How can sort performance be so different

2019-02-20 Thread Bob Jolliffe
On Wed, 20 Feb 2019 at 21:35, Merlin Moncure wrote: > > On Mon, Feb 18, 2019 at 9:49 AM Bob Jolliffe wrote: > > > > Sorry Merlin for not replying earlier. The difference is indeed hard > > to understand but it is certainly there. We altered the collation to > > use on the name field in that

Re: How can sort performance be so different

2019-02-20 Thread Merlin Moncure
On Mon, Feb 18, 2019 at 9:49 AM Bob Jolliffe wrote: > > Sorry Merlin for not replying earlier. The difference is indeed hard > to understand but it is certainly there. We altered the collation to > use on the name field in that table and the problem has gone. Having > having solved the

Re: How can sort performance be so different

2019-02-20 Thread Peter Geoghegan
On Wed, Feb 20, 2019 at 1:42 PM Bob Jolliffe wrote: > It seems not to be (completely) particular to the installation. > Testing on different platforms we found variable speed difference > between 100x and 1000x slower, but always a considerable order of > magnitiude. The very slow performance

neither CPU nor IO bound, but throttled performance

2019-02-20 Thread Gunther
Hi, I have an Amazon Linux based Postgresql 11 server here on a t2.medium EC2 instance. It is serving 24 worker processes that read jobs from a queue (thanks to SELECT ... FOR UPDATE SKIP LOCKED!) and do jobs some of which are reading and writing business data to the database, others are only

Re: How can sort performance be so different

2019-02-20 Thread Peter Geoghegan
On Wed, Feb 20, 2019 at 2:25 PM Peter Geoghegan wrote: > I suspect that the reasons why the Lao locale sorts so much slower may > also have something to do with the intrinsic cost of supporting more > complicated rules. I strongly suspect that it has something to do with the issue described here

Re: Why isn't an index scan being used?

2019-02-20 Thread Justin Pryzby
On Tue, Feb 19, 2019 at 09:29:46PM -0700, Michael Lewis wrote: > On Tue, Feb 19, 2019, 8:00 PM Andrew Gierth > wrote: > > > > "Abi" == Abi Noda writes: > > Abi> However, when I index the closed column, a bitmap scan is used > > Abi> instead of an index scan, with slightly slower