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