Hi,
I face a surprising behaviour with VACUUM ANALYZE.
For a table with a structure like like this (and few records):
create table my_table (
my_column numeric
);
When I run the following:
VACUUM ANALYZE my_table;
SELECT relname, last_analyze, last_vacuum FROM pg_stat_all_tables where
relnam
Hi all,
I'm trying to optimize the following query on postgres 11.6 (running on
Aurora)
select distinct
c1,
first_value(c2) OVER (PARTITION BY c1 order by c2) AS c2,
first_value(c3) OVER (PARTITION BY c1 order by c3) AS c3,
first_value(c4) OVER (PARTITION BY c1 order by c4) AS c4
from
t;
Hi Michael,
I simplified the real query before posting it here and I now realize that I
oversimplified things.
Unfortunately the real query cannot be re-written with a group by.
Some of the window functions are more complex with order by clause using
complex expressions involving multiple column
t on c1, c2
On Tue, Jul 7, 2020 at 12:48 AM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Monday, July 6, 2020, Sebastien Arod wrote:
>
>> I would have expected postgresql to "share" a preliminary sort on c1 that
>> would then be useful to reduce th