Re: Plan rows - 1 or many

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Plan rows - 1 or many
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17CE3D6B@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Plan rows - 1 or many  (Peter Mogensen <apm@one.com>)
Ответы Re: Plan rows - 1 or many  (Peter Mogensen <apm@one.com>)
Список 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 по дате отправления:

Предыдущее
От: Peter Mogensen
Дата:
Сообщение: Plan rows - 1 or many
Следующее
От: Peter Mogensen
Дата:
Сообщение: Re: Plan rows - 1 or many