Using Table Indexes After Joins - Mailing list pgsql-novice

From Alex Koay
Subject Using Table Indexes After Joins
Date
Msg-id CAG+qcA5xAnuuDMkbS1PR+w9BDHj=+gF=a-O951rNGcjkYZc6-A@mail.gmail.com
Whole thread Raw
Responses Re: Using Table Indexes After Joins  (Willy-Bas Loos <willybas@gmail.com>)
List pgsql-novice
Is it possible to use the original table indexes after a join?

I have a query like this:
SELECT lag(bar.d, 1) OVER (foo.a, foo.b, foo.c) FROM foo NATURAL JOIN bar

with an index on foo(a,b,c), but it doesn't seem to use the index for
the sort pre-window.
Note that foo and bar have a strict one-to-one relationship.

In such a case, would it be more advisable to use one single table instead?

Regards,
Alex

pgsql-novice by date:

Previous
From: Jim Moon
Date:
Subject: Re: How to successfully create a new function?
Next
From: Len
Date:
Subject: Re: How to successfully create a new function?