Re: [PERFORM] no MCV list of tiny table with unique columns

2016-11-02 Thread Tom Lane
Justin Pryzby writes: >> With only two rows in the table, I'm not real sure why you'd need an MCV >> list. Could we see the actual problem query (and the other table >> schemas), rather than diving into the code first? > Sigh, yes, but understand that it's a legacy report which happens to curren

Re: [PERFORM] Big Memory Boxes and pgtune

2016-11-02 Thread Jim Nasby
On 10/28/16 2:33 PM, Joshua D. Drake wrote: * A very high shared_buffers (in newer releases, it is not uncommon to have many, many GB of) Keep in mind that you might get very poor results if shared_buffers is large, but not large enough to fit the entire database. In that case buffer replacem

Re: [PERFORM] query slowdown after 9.0 -> 9.4 migration

2016-11-02 Thread Jim Nasby
On 10/27/16 8:37 PM, Filip RembiaƂkowski wrote: Does it make sense to ask on postgis-users list? Yes. I suspect that the reason Buffers: shared hit is so high is because of something st_distance_sphere() is doing. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Anal

Re: [PERFORM] limit 1 on view never finishes

2016-11-02 Thread Jim Nasby
On 10/27/16 3:46 PM, Craig James wrote: Limit (cost=3264.63..7193.14 rows=1 width=4) -> Nested Loop (cost=3264.63..428658697.57 rows=109114 width=4) Join Filter: (rv.version_id = sample.version_id) -> Index Only Scan Backward using version_pkey on version rv (cost=0.42

Re: [PERFORM] no MCV list of tiny table with unique columns

2016-11-02 Thread Justin Pryzby
On Wed, Nov 02, 2016 at 04:05:46PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > I believe the join is being (badly) underestimated, leading to a crappy plan > > involving multiple nested loop joins, which takes 2.5 hours instead of a > > handful of seconds; I believe that might be resolved b

Re: [PERFORM] no MCV list of tiny table with unique columns

2016-11-02 Thread Tom Lane
Justin Pryzby writes: > I believe the join is being (badly) underestimated, leading to a crappy plan > involving multiple nested loop joins, which takes 2.5 hours instead of a > handful of seconds; I believe that might be resolved by populating its MCV > list.. With only two rows in the table, I'

[PERFORM] archive_command too slow.

2016-11-02 Thread Joao Junior
Hi friends, I am running 2 Linux machines, kernel 3.13.0-45-generic #74-Ubuntu SMP. Postgresql version 9.4 in both machine, in a Hot Standby cenario. Master-Slave using WAL files, not streaming replication. The archive_command from master is: archive_command = '/usr/bin/rsync -a -e "ssh" "%p"

[PERFORM] no MCV list of tiny table with unique columns

2016-11-02 Thread Justin Pryzby
We have a report query which joins (multiple times, actually) against this trivial, tiny table: ts=# \d bsm_to_switch Table "public.bsm_to_switch" Column | Type | Modifiers +--+--- bsm| text | not null switch | text | not null ts=# SELECT length(bsm), length(switch) FR

Re: [PERFORM] Perf decreased although server is better

2016-11-02 Thread Rick Otten
How did you migrate from one system to the other? [ I recently moved a large time series table from 9.5.4 to 9.6.1 using dump and restore. Although it put the BRIN index on the time column back on, it was borked. Reindexing didn't help. I had to switch it to a regular btree index. I think the

Re: [PERFORM] Perf decreased although server is better

2016-11-02 Thread Kevin Grittner
On Wed, Nov 2, 2016 at 8:26 AM, Benjamin Toueg wrote: > I'm facing a peformance decrease after switching to a more performant VPS : In my world, the VPS that performs worse is not considered "more performant", no matter what the sales materials say. > What benchmark should I perform before swit

Re: [PERFORM] Perf decreased although server is better

2016-11-02 Thread Tomas Vondra
On 11/02/2016 02:26 PM, Benjamin Toueg wrote: Hi everyone, I'm facing a peformance decrease after switching to a more performant VPS : http://serverfault.com/questions/812702/posgres-perf-decreased-although-server-is-better Well, changing so many things at once (CPU, RAM, storage, Ubuntu ver

[PERFORM] Perf decreased although server is better

2016-11-02 Thread Benjamin Toueg
Hi everyone, I'm facing a peformance decrease after switching to a more performant VPS : http://serverfault.com/questions/812702/posgres-perf-decreased-although-server-is-better My questions are: 1. What benchmark should I perform before switching to a new server? 2. What's your rule of th