Re: Explain returns different number of rows

Christophe Pettus <xof@thebuild.com>

From: Christophe Pettus <xof@thebuild.com>
To: Vince McMahon <sippingonesandzeros@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Date: 2022-10-20T16:56:23Z
Lists: pgsql-performance

> On Oct 20, 2022, at 09:52, Vince McMahon <sippingonesandzeros@gmail.com> wrote:
> The number of rows are different. 

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.