Thanks for the answer!
On Tue, Dec 3, 2019 at 8:39 AM Jeff Janes wrote:
> What happens if you set enable_sort to off before running it?
Turning enable_sort to off makes the first query to not sort[1]. It
does run much slower though compared to the original query[2]. This
time I do VACUUM ANALYZE
On Mon, Dec 2, 2019 at 8:29 AM Aufar Gilbran wrote:
> Hello,
>
> I'm trying to figure out how to optimise 3-table (many-to-many relation)
> joins
> with predicate, limit, and ordering, where one of the tables returns at
> most one
> row.
>
> This is the query that I have right now:
>
> SELECT ent
Hello,
I'm trying to figure out how to optimise 3-table (many-to-many relation) joins
with predicate, limit, and ordering, where one of the tables returns at most one
row.
This is the query that I have right now:
SELECT entity.id
FROM (
SELECT entity_tag.entity_id
FROM tag
JOIN entit