Re: Plan rows - 1 or many - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Plan rows - 1 or many
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17CE3D6B@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Plan rows - 1 or many  (Peter Mogensen <apm@one.com>)
Responses Re: Plan rows - 1 or many  (Peter Mogensen <apm@one.com>)
List pgsql-general
Peter Mogensen wrote:
> I have an application where I would really like to be able to look at en
> SQL query and answer the question:
> 
> "Is this query capable of returning more than 1 row?"

> Can I conclude that when plan_rows is 1 then there will never be more
> than 1 row returned by the query?

I would say no.

If the planner estimates one row, that means that it guesses that
it will be one or less.

And a query that can potentially return many rows can certainly
also return only one row or none at all.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Peter Mogensen
Date:
Subject: Plan rows - 1 or many
Next
From: Peter Mogensen
Date:
Subject: Re: Plan rows - 1 or many