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 1olYqf-0004kT-Ab for pgsql-general@arkaria.postgresql.org; Thu, 20 Oct 2022 16:56:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1olYqd-0004F7-Ae for pgsql-general@arkaria.postgresql.org; Thu, 20 Oct 2022 16:56:47 +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 1olYqc-0004Ex-WB for pgsql-general@lists.postgresql.org; Thu, 20 Oct 2022 16:56:47 +0000 Received: from smtp104.ord1d.emailsrvr.com ([184.106.54.104]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olYqW-00027o-EO for pgsql-general@lists.postgresql.org; Thu, 20 Oct 2022 16:56:46 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp6.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 8FB29E01A8; Thu, 20 Oct 2022 12:56:38 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Explain returns different number of rows From: Christophe Pettus In-Reply-To: Date: Thu, 20 Oct 2022 09:56:23 -0700 Cc: pgsql-general@lists.postgresql.org X-Mailbutler-Message-Id: A42E9296-BB4A-49F5-A436-011E8A4FF681 Content-Transfer-Encoding: quoted-printable Message-Id: <6B906119-82AD-49FC-A47D-8652FD03D936@thebuild.com> References: To: Vince McMahon X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: 32908f10-c6c5-41b6-a392-f0decfe4ceb7-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 20, 2022, at 09:52, Vince McMahon = wrote: > The number of rows are different.=20 This isn't unexpected. EXPLAIN does not actually run the query and = determine how many rows are returned; it calculates an estimate based on = the current system statistics, which vary constantly depending on = activity in the database.=