For testing purposes, I'm interested in speeding up the following query:
SELECT a.*, b.id
FROM "table" a JOIN "table" b ON
a.id = b.id
where "table" has an index on id. When passed this, postgres attempts to perform an index scan on the instance b, but needs to sort a. Is it possible to use the index on a.id in this query as well (or is this query going to be fundamentally slow, due to reasons similar to the discussion here).