New answers tagged

1

(Addressing first question) Toss comment_unseen; instead, use a LEFT JOIN ... WHERE ... IS NULL or WHERE NOT EXISTS ( SELECT 1 FROM comment_seen WHERE ... ) For comment_seen, replace CONSTRAINT user_id UNIQUE (user_id, comment_id) with this (Note: a PK includes a uniqueness constraint): PRIMARY KEY(user_id, comment_id) If you need to look up which users ...


Top 50 recent answers are included