Re: Last event per user

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Luís Roberto Weck <luisroberto(at)siscobra(dot)com(dot)br>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Last event per user
Date: 2019-08-12 22:35:44
Message-ID: CAHOFxGpUwcjhs9trJwAkNNhY8doyi2shzCr=2ymLk+-3RzJhrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

It seems like it should be-
SELECT * FROM users u JOIN last_user_event_1 e USING (user_id,user_group);
--OR--
SELECT * FROM last_user_event_2 e;

for them to produce the same result set, since the last_user_event_2
already (could) have users info in it very simply by select * instead of
e.* in that view definition.

Are there other important joins/where/order by/limits that would be on this
"main query" that is just SELECT * FROM ____ right now which you have
dropped to try to simplify the example?

In response to

Responses

  • Re: at 2019-08-12 22:43:54 from Luís Roberto Weck

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2019-08-12 22:37:26 Re: Planner performance in partitions
Previous Message Luís Roberto Weck 2019-08-12 22:28:33 Re: Last event per user