Re: BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function
Дата
Msg-id 485F48DB-5655-434C-AAED-ACCD5B938CB4@thebuild.com
обсуждение исходный текст
Ответ на BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function  (Xinyu Liu <xinyuliu@umich.edu>)
Список pgsql-bugs

> On Sep 18, 2020, at 20:32, PG Bug reporting form <noreply@postgresql.org> wrote:
[snip]
> First query:
> SELECT "s_suppkey"
> FROM   "supplier"
> WHERE  s_suppkey > 100;
>
> Second query:
> SELECT "s_suppkey"
> FROM   "supplier"
> WHERE  s_suppkey > 100
> GROUP  BY s_suppkey;

[snip]

> [Expected Behavior]
> Since these two queries are semantically equivalent, we were hoping that
> PostgreSQL will return the same results in roughly the same amount of
> time.

These two queries are not semantically equivalent, as described.  I might guess that the table definition has a primary
key(or should have had) on "supplier"."s_suppkey", and thus the GROUP BY should be redundant, but there's nothing in
thereport or the query plans that indicate this is the case. 
--
-- Christophe Pettus
   xof@thebuild.com




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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function
Следующее
От: Xinyu Liu
Дата:
Сообщение: Re: BUG #16625: Query Optimizer - Performance bug related to removal of unnecessary aggregate function