Re:

From: Luís Roberto Weck <luisroberto(at)siscobra(dot)com(dot)br>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re:
Date: 2019-08-12 22:43:54
Message-ID: e3e3f5e059d212c962d8cdb128837549@siscobra.com.br
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?

You're right about the queries, I made a mistake.

Yes, I'm going to filter them by user_id and user_group, possibly (but
not likely) using LIMIT 1. In the explain examples I am using user_id =
1272897 and user_group = 19117

In response to

Responses

  • Re: at 2019-08-12 22:53:41 from Michael Lewis

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2019-08-12 22:53:41 Re:
Previous Message Michael Lewis 2019-08-12 22:37:26 Re: Planner performance in partitions