key varchar NOT NULL,
value varchar NOT NULL,
- PRIMARY KEY ( image, key )
+ PRIMARY KEY ( key, image )
);
-CREATE INDEX exif_info_key ON exif_info ( key );
-CLUSTER exif_info_key ON exif_info;
+CLUSTER exif_info_pkey ON exif_info;
GRANT INSERT ON TABLE deleted_images TO pr0n;
GRANT INSERT,SELECT,UPDATE,DELETE ON TABLE events TO pr0n;
+set work_mem to 1048576;
+
alter table images add column is_render boolean NOT NULL DEFAULT false;
alter table images add column render_id integer;
CREATE UNIQUE INDEX unique_id_for_render ON images USING btree (vhost, event, id);
alter table deleted_images add column is_render boolean NOT NULL DEFAULT false;
alter table deleted_images add column render_id integer;
+
+drop index exif_info_key;
+alter table exif_info drop constraint exif_info_pkey;
+alter table exif_info create primary key ( key, image );
+cluster exif_info_pkey on exif_info;