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: 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

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-06 Thread Laurenz Albe
Merlin Moncure wrote: > yeah, probably. Having said that, I'm really struggling that it can > take take several minutes to sort such a small number of rows even > with location issues. I can sort rocks faster than that :-). > > Switching between various european collations, I'm seeing subsecond

Re: How can sort performance be so different

2019-02-05 Thread Merlin Moncure
On Thu, Jan 31, 2019 at 7:30 AM Bob Jolliffe wrote: > > Hi Peter > > I did check out using ICU and the performance does indeed seem > comparable with C locale: > > EXPLAIN ANALYZE select * from chart order by name COLLATE "lo-x-icu"; > QUERY

Re: How can sort performance be so different

2019-01-31 Thread Bob Jolliffe
Hi Peter I did check out using ICU and the performance does indeed seem comparable with C locale: EXPLAIN ANALYZE select * from chart order by name COLLATE "lo-x-icu"; QUERY PLAN

Re: How can sort performance be so different

2019-01-30 Thread Bob Jolliffe
Hi Tom After much performance measuring of VPS I believe you are right in your suspicion about locale. The database is full of Laos characters (it is a government system in Laos). When I tested on my VPS (en_US.UTF-8) I get the crazy slow performance, whereas my laptop postgresql is C.UTF-8.

Re: How can sort performance be so different

2019-01-29 Thread Tom Lane
Bob Jolliffe writes: > I wonder what can cause such a massive discrepancy in the sort time. Are you using the same locale (LC_COLLATE) setting on both machines? Some locales sort way slower than C locale does. That's not enough to explain a 1000X discrepancy --- I concur with the other opinions

Re: How can sort performance be so different

2019-01-29 Thread Saurabh Nanda
Run https://github.com/n-st/nench and benchmark the underlying vps first. On Tue 29 Jan, 2019, 11:59 PM Bob Jolliffe The following is output from analyzing a simple query on a table of > 13436 rows on postgresql 10, ubuntu 18.04. > > explain analyze select * from chart order by name; >

Re: How can sort performance be so different

2019-01-29 Thread Pavel Stehule
Ășt 29. 1. 2019 v 19:29 odesĂ­latel Bob Jolliffe napsal: > The following is output from analyzing a simple query on a table of > 13436 rows on postgresql 10, ubuntu 18.04. > > explain analyze select * from chart order by name; >QUERY PLAN > >