Re: Last event per user - Mailing list pgsql-performance

From Michael Lewis
Subject Re: Last event per user
Date
Msg-id CAHOFxGpUwcjhs9trJwAkNNhY8doyi2shzCr=2ymLk+-3RzJhrA@mail.gmail.com
Whole thread Raw
In response to Re: Last event per user  (Luís Roberto Weck <luisroberto@siscobra.com.br>)
Responses Re:  (Luís Roberto Weck <luisroberto@siscobra.com.br>)
List 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?

pgsql-performance by date:

Previous
From: Luís Roberto Weck
Date:
Subject: Re: Last event per user
Next
From: Michael Lewis
Date:
Subject: Re: Planner performance in partitions