Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrLkp-0005GN-M5 for pgsql-performance@arkaria.postgresql.org; Thu, 10 Jun 2021 14:33:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrLkn-0003b1-EV for pgsql-performance@arkaria.postgresql.org; Thu, 10 Jun 2021 14:33:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrLkn-0003at-2J for pgsql-performance@lists.postgresql.org; Thu, 10 Jun 2021 14:33:53 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lrLkk-0003Lr-0I for pgsql-performance@lists.postgresql.org; Thu, 10 Jun 2021 14:33:52 +0000 Received: by mail-io1-xd2c.google.com with SMTP id k5so17433764iow.12 for ; Thu, 10 Jun 2021 07:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uujH1Xv9LE/julE8lovApdkMI+U4PZGl3sQ5fQehEgE=; b=GyAbZQvx35VPJccxUL8B4as1yqilGQpE5cIxeQasQai3fvR+tr0QKJbZFH9TxxMXq3 FRcyHrXNKtGujbtZVR3zJKPc9xxLS/wniclhyH6g0aDA+LDKTBH5W22A069L3nzI0t3U xbIaQIsenFKSZjzWBabat4IojiFEKohgLPxSyJukDkCCvRpR/sWgTT9/wgKbFIKRD8kG RJ6eXgwGXVgf9zAkojShs63TnmYhE4ayre9QD1G6gBq3Y34saBrfs/vXqzD3bjcihhek 6NvdW7BrGqc2srDb1UdefTmf6RwA8bmzvHCbuTSPZRW78pQjsiasaRx8koEnaM+e1ksT 6oFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uujH1Xv9LE/julE8lovApdkMI+U4PZGl3sQ5fQehEgE=; b=D2RjZe0iTMQB2qHDApE2mKdN2coETZo5iO9jdAyD7Grr42KQW9uDOhQMP04b4aYeo+ 3ih/JjhJUxMzSkhmlevsvs2oY2e3BUovmQrDTJo4B/EvNb0X2lPXbCeiEvLKV32Qp715 PAbFIvJ6kluXy9MMmr6mslnhJmHzz3j4jkvVS52f8cRa/uCDe6TDROrCZwFmYFqSlJnU h18pKSOfhOy0e0RJifcMkgUM+wJQds1UCOWxDr6EccxarlSzDzn2aMxzgi2GDDcg4g0R RpK00GGa/4EuZq4Y8jas4dn81glcIY5uYcLJnVT54sx0S9jdBlqTnEgbY9LXuMEcSrP7 Wt5w== X-Gm-Message-State: AOAM533LHG/XoSbfRIGxSm4t+2yUtMsE9wkKqwq+jLpowuosSgRsrld3 FH29ZDa+vLGQooh4xL+4IZkw2A== X-Google-Smtp-Source: ABdhPJyavpU0c9KXmBJy7kallo81qkvk86s96RA+NxDxgFC8X/NlvEHNt6LlTI316MDEFVe3+hFI+A== X-Received: by 2002:a05:6638:2707:: with SMTP id m7mr819990jav.66.1623335628041; Thu, 10 Jun 2021 07:33:48 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k4sm1822037ior.55.2021.06.10.07.33.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jun 2021 07:33:47 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 5B5B2800BDE; Thu, 10 Jun 2021 09:33:46 -0500 (CDT) Date: Thu, 10 Jun 2021 09:33:46 -0500 From: Justin Pryzby To: Haseeb Khan Cc: pgsql-performance@lists.postgresql.org Subject: Re: Page File Size Reached Critical Threshold PostgreSQL V13 Message-ID: <20210610143346.GF16435@telsasoft.com> References: <20210610042853.GB16435@telsasoft.com> <9B6997F1-1E68-41BD-9AB1-E7508CCB48B2@gmail.com> <20210610085539.GC16435@telsasoft.com> <20210610094850.GD16435@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Please work through the Slow Query wiki page and try to provide as much information as possible. It's too hard to try to help if each communication includes only a fraction of the requested information. On Thu, Jun 10, 2021 at 04:33:51PM +0500, Haseeb Khan wrote: > PFB the query and there are many other queries like these > > select > pd.gender, > count(1) as dispensation_counts > from cdss_wasfaty.dispensation_fact df > inner join cdss_wasfaty.patient_dim pd > on df.patient_key = pd.patient_key > inner join cdss_wasfaty.date_dim date_dim > on df.dispensation_date_key = date_dim.date_key > and date_dim.year IN (2020) > group by pd.gender > > On Thu, Jun 10, 2021 at 2:48 PM Justin Pryzby wrote: > > > Can you give an example of a query that performed poorly? > > > > Send the query, and its explain (analyze,buffers,settings) for the query, > > and schema for the relevant queries. > > > > > > https://wiki.postgresql.org/wiki/Slow_Query_Questions -- Justin Pryzby System Administrator Telsasoft +1-952-707-8581