drop table questions, "QuestionUserStatus";
create table questions (
  id int primary key
);

insert into questions select generate_Series(1,1000);

create table "QuestionUserStatus" (
  "user" int not null,
  question int not null,
  primary key (question,"user")
);

insert into "QuestionUserStatus" select u,q from generate_series(0,1000) u, generate_series(1,1000)q;
analyze questions, "QuestionUserStatus";

set enable_mergejoin=0;
set enable_hashjoin=0;
EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM questions LEFT JOIN "QuestionUserStatus" ON questions.id = "QuestionUserStatus".question WHERE "QuestionUserStatus".user = 0;
