diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-01 12:20:04 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-01 12:20:04 -0800 |
commit | e529ceee21b4fb0c18f32f7a097bce14229af42f (patch) | |
tree | af9439c9425ebf1f759787f150bfcab3aec47823 /db/statusnet.sql | |
parent | 6ea9eb33d2767df26fb757e3b507dd2e7e7c7286 (diff) |
Add index on post_id for file_to_post, needed for efficient lookups of files/urls attached to a given post.
Diffstat (limited to 'db/statusnet.sql')
-rw-r--r-- | db/statusnet.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db/statusnet.sql b/db/statusnet.sql index 4158f0167..4aa37ce1c 100644 --- a/db/statusnet.sql +++ b/db/statusnet.sql @@ -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; |