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 1oTQLY-0000Px-EE for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2022 16:13:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTQLW-0006Qs-Sc for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2022 16:13:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTQLW-0006Qi-JW for pgsql-hackers@lists.postgresql.org; Wed, 31 Aug 2022 16:13:42 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTQLU-0006j1-5G for pgsql-hackers@lists.postgresql.org; Wed, 31 Aug 2022 16:13:41 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1oTQLR-0005Tq-4d; Wed, 31 Aug 2022 12:13:37 -0400 Date: Wed, 31 Aug 2022 12:13:37 -0400 From: Bruce Momjian To: Dave Page Cc: David Rowley , PostgreSQL Developers Subject: Re: Tracking last scan time Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Aug 31, 2022 at 05:02:33PM +0100, Dave Page wrote: > > > On Tue, 30 Aug 2022 at 19:46, Bruce Momjian wrote: > > On Fri, Aug 26, 2022 at 02:05:36PM +0100, Dave Page wrote: > > On Thu, 25 Aug 2022 at 01:44, David Rowley wrote: > >     I don't have a particular opinion about the patch, I'm just pointing > >     out that there are other ways. Even just writing down the numbers on > a > >     post-it note and coming back in a month to see if they've changed is > >     enough to tell if the table or index has been used. > > > > > > There are usually other ways to perform monitoring tasks, but there is > > something to be said for the convenience of having functionality built in > and > > not having to rely on tools, scripts, or post-it notes :-) > > Should we consider using something cheaper like time() so we don't need > a GUC to enable this? > > > Interesting idea, but on my mac at least, 100,000,000 gettimeofday() calls > takes about 2 seconds, whilst 100,000,000 time() calls takes 14(!) seconds. Wow. I was just thinking you need second-level accuracy, which must be cheap somewhere. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson