Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Filipe Oliveira
Can you remove me from your mailing list? Thanks.

Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Merlin Moncure
On Thu, Jan 5, 2017 at 10:51 AM, Flávio Henrique wrote: > @Merlin Moncure >> >> Big gains (if any) are likely due to indexing strategy. >> I do see some suspicious casting, for example: >> Join Filter: ((four_charlie.delta_tango)::integer = >> (six_quebec.golf_bravo)::integer) >> Are you casting i

Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Daniel Blanch Bataller
Hi, If just recreating the index now it uses it, it might mean that the index was bloated, that is, it grew so big that it was cheaper a seq scan. I’ve seen another case recently where postgres 9.6 wasn’t using the right index in a query, I was able to reproduce the issue crafting index bigger,

Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Kevin Grittner
On Thu, Jan 5, 2017 at 10:51 AM, Flávio Henrique wrote: > Replying your comment, I think they tunned the server: > effective_cache_size = 196GB > shared_buffers = 24GB (this shouldn't be higher?) Probably not, although it may be a good idea to try settings either side of that (say, 16GB and 32GB

Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Flávio Henrique
Hi all! Sorry the delay (holidays). Well, the most expensive sequencial scan was solved. I asked the db team to drop the index and recreate it and guess what: now postgresql is using it and the time dropped. (thank you, @Gerardo Herzig!) I think there's still room for improvement, but the problem

Re: [PERFORM] Slow query after 9.3 to 9.6 migration

2017-01-05 Thread Merlin Moncure
On Tue, Dec 27, 2016 at 5:50 PM, Flávio Henrique wrote: > Hi there, fellow experts! > > I need an advice with query that became slower after 9.3 to 9.6 migration. > > First of all, I'm from the dev team. > > Before migration, we (programmers) made some modifications on query bring > it's average t