Add index on post_id for file_to_post, needed for efficient lookups of files/urls attached to a given post.
This commit is contained in:
parent
6ea9eb33d2
commit
e529ceee21
@ -110,3 +110,5 @@ insert into queue_item_new (frame,transport,created,claimed)
|
||||
alter table queue_item rename to queue_item_old;
|
||||
alter table queue_item_new rename to queue_item;
|
||||
|
||||
alter table file_to_post
|
||||
add index post_id_idx (post_id);
|
||||
|
@ -523,7 +523,8 @@ create table file_to_post (
|
||||
post_id integer comment 'id of the notice it belongs to' references notice (id),
|
||||
modified timestamp comment 'date this record was modified',
|
||||
|
||||
constraint primary key (file_id, post_id)
|
||||
constraint primary key (file_id, post_id),
|
||||
index post_id_idx (post_id)
|
||||
|
||||
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user