Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list
Дата
Msg-id 1312554.1654631755@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Tue, 7 Jun 2022 at 19:58, Jean Landercy - BEEODIVERSITY
> <jean.landercy@beeodiversity.com> wrote:
>> Here is the detail of the table (I have anonymized it on SO, this is its real name):
>> "logistic_site_location_54ae0166_id" gist (location)
> I imagine this is due to the planner choosing an index-only scan on
> the above index. A similar problem was reported in [1].

The other gist index could also be the problem.  It seems odd though
that the planner would favor either index for this purpose over the btree
indexes on scalar columns, which you'd think would be a lot smaller.
I wonder if there is some quirk in gist cost estimation that makes it
improperly claim to be cheaper than btree scans.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Collation version tracking for macOS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Collation version tracking for macOS