Hello Hellmuth,
Thank you for your response.
I've uploaded the query plan for the first query (user_id=2) here:
https://gist.github.com/anonymous/6d251b277ef71f8977b03cab91fedccdThe query
plan for the second query (user_id=1) can be found here:
https://gist.github.com/anonymous/32ed485b40cce26
Hello,
I have the following schema:
CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, name TEXT
NOT NULL UNIQUE ); CREATE TABLE friends ( user_id
BIGINT NOT NULL REFERENCES users, friend_user_id BIGINT NOT NULL
REFERENCES users, UNIQUE