Re: Wrong rows count in EXPLAIN

2022-04-27 Thread Пантюшин Александр Иванович
din Отправлено: 27 апреля 2022 г. 13:08:22 Кому: Пантюшин Александр Иванович Копия: pgsql-hack...@postgresql.org; Тарасов Георгий Витальевич Тема: Re: Wrong rows count in EXPLAIN Hi! > 26 апр. 2022 г., в 13:45, Пантюшин Александр Иванович > написал(а): > > When I create a new table, and

Re: Wrong rows count in EXPLAIN

2022-04-27 Thread Bruce Momjian
On Wed, Apr 27, 2022 at 09:44:21AM -0400, Tom Lane wrote: > =?koi8-r?B?8MHO1MDbyc4g4czFy9PBzsTSIOnXwc7P18ne?= > writes: > > When I create a new table, and then I evaluate the execution of the SELECT > > query, I see a strange rows count in EXPLAIN > > CREATE TABLE test1(f INTEGER PRIMARY KEY

Re: Wrong rows count in EXPLAIN

2022-04-27 Thread Tom Lane
=?koi8-r?B?8MHO1MDbyc4g4czFy9PBzsTSIOnXwc7P18ne?= writes: > When I create a new table, and then I evaluate the execution of the SELECT > query, I see a strange rows count in EXPLAIN > CREATE TABLE test1(f INTEGER PRIMARY KEY NOT NULL); > ANALYZE test1; > EXPLAIN SELECT * FROM test1; >

Re: Wrong rows count in EXPLAIN

2022-04-27 Thread David Rowley
On Wed, 27 Apr 2022 at 21:08, Andrey Borodin wrote: > Which Postgres version do you use? 3d351d91 changed things so we could tell the difference between a relation which was analyzed and is empty vs a relation that's never been analyzed. That's why you're not seeing the same behaviour as the OP.

Re: Wrong rows count in EXPLAIN

2022-04-27 Thread Andrey Borodin
> 27 апр. 2022 г., в 15:17, Пантюшин Александр Иванович > написал(а): > > Hi, > >Which Postgres version do you use? > I checked this on PG 11 > ... > and on PG 13 Yes, I think before 3d351d91 it was impossible to distinguish between actually empty and never analyzed table. But now it is

Re: Wrong rows count in EXPLAIN

2022-04-27 Thread Andrey Borodin
Hi! > 26 апр. 2022 г., в 13:45, Пантюшин Александр Иванович > написал(а): > > When I create a new table, and then I evaluate the execution of the SELECT > query, I see a strange rows count in EXPLAIN > CREATE TABLE test1(f INTEGER PRIMARY KEY NOT NULL); > ANALYZE test1; > EXPLAIN SELECT *

Wrong rows count in EXPLAIN

2022-04-27 Thread Пантюшин Александр Иванович
When I create a new table, and then I evaluate the execution of the SELECT query, I see a strange rows count in EXPLAIN CREATE TABLE test1(f INTEGER PRIMARY KEY NOT NULL); ANALYZE test1; EXPLAIN SELECT * FROM test1; QUERY PLAN