Re: Incorrect index used in few cases..

2019-06-23 Thread AminPG Jaffer
Sorry for late reply. The initial values before upgrade for seq_page_cost=1, random_page_cost=4 and after upgrading when we started to see the issues as we were seeing "Seq Scan" we change them seq_page_cost=1, random_page_cost=1 The issue happens only in production so making the index invalid w

monitoring tuple_count vs dead_tuple_count

2019-06-23 Thread Mariel Cherkassky
Hi, I wrote a script that monitored the size of a specific table of mine(dead tuples_mb vs live tuples_mb). The script run a query on pg_stattuple every 15 minutes : select * from pg_stattuple('table_name'). I know that every night there is a huge delete query that deletes most of the table`s conte

materialized view refresh of a foreign table

2019-06-23 Thread Rick Otten
I'm not sure where else to look, so I'm asking here for tips. I have a table in a remote (Heroku-managed) postgresql database (PG 10.7). On the other end, (PG 11.3) I have a foreign table configured with a materialized view in front of it. Up until Thursday evening, it was taking about 12 - 15 s