Re: Specific query taking time to process

2019-12-11 Thread Jeff Janes
On Wed, Dec 11, 2019 at 5:21 PM Fahiz Mohamed wrote: > There is a slight different in both instance’s data. Inastanbce 1 contains > latest data and instance 2 consists of data which is 3 weeks older than > instance 1. > In knowing where to look for differences in performance, there is a big

Re: Specific query taking time to process

2019-12-11 Thread Fahiz Mohamed
There is a slight different in both instance’s data. Inastanbce 1 contains latest data and instance 2 consists of data which is 3 weeks older than instance 1. Following are the number of rows in each table in both instances Instance 1 alf_node : 96493129 rows alf_node_properties : 455599288

Re: Specific query taking time to process

2019-12-11 Thread Jeff Janes
On Tue, Dec 10, 2019 at 3:40 AM Fahiz Mohamed wrote: > Thank you very much for your prompt responses. > > I have analysed more regarding this and found the long running query. > > I ran "explain analyse" on this query and I got following result. (We have > 2 identical DB instances and they

Re: Specific query taking time to process

2019-12-11 Thread Michael Lewis
This seems beyond me at this point, but I am curious if you also vacuumed alf_node_properties and alf_node tables and checked when they last got (auto)vacuumed/analyzed. With default configs for autovacuum parameters and tables with that many rows, they don't qualify for autovacuum very often. I

Re: unexpected result for wastedbytes query after vacuum full

2019-12-11 Thread Guillaume Lelarge
Le mar. 10 déc. 2019 à 20:48, Jeff Janes a écrit : > On Tue, Dec 10, 2019 at 11:43 AM Guillaume Lelarge > wrote: > > This query uses the column statistics to estimate bloat. AFAIK, json >> columns don't have statistics, so the estimation can't be relied on (for >> this specific table at least).