> On 06 Jan 2015, at 19:02, Tim Smith <randomdev4+postgres@xxxxxxxxx> wrote: > create table app_sessions( > session_id char(64) unique not null, > user_id char(32) unique not null, > session_start bigint not null, > session_lastactive bigint not null > ); Just an observation: Are you sure that you don’t want to allow your users to have multiple sessions? You made users unique across the entire table, which mean there can only ever be one session for a user. Unless you delete ‘expired’ sessions ASAP, users won’t be able to start a new session again after their original session expired. That may be desirable for your application and thus intended, but perhaps it was not? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general