Re: Explain returns different number of rows

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Vince McMahon <sippingonesandzeros(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Explain returns different number of rows
Date: 2022-10-20 16:56:23
Message-ID: 6B906119-82AD-49FC-A47D-8652FD03D936@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

> On Oct 20, 2022, at 09:52, Vince McMahon <sippingonesandzeros(at)gmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vince McMahon 2022-10-20 17:19:38 Does standalone postfrsql have autogrowth/ manual growth on table space?
Previous Message Vince McMahon 2022-10-20 16:52:12 Explain returns different number of rows

Browse pgsql-performance by date

  From Date Subject
Next Message Lars Aksel Opsahl 2022-10-21 09:19:58 ogr2ogr slow sql when checking system tables for column info and so on.
Previous Message Vince McMahon 2022-10-20 16:52:12 Explain returns different number of rows