Created
August 2, 2013 18:20
-
-
Save ipconfiger/6142155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//数据表 blogs: | |
CREATE TABLE `blogs` ( | |
`id` int(11) NOT NULL, | |
`object` varbinary(20000) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
//同时建立两个索引表 | |
CREATE TABLE `blog_idx_post_date` ( | |
`id` int(10) unsigned NOT NULL, | |
`post_date` DATETIME NOT NULL, | |
PRIMARY KEY (`id`), | |
INDEX `idx_blogs_by_post_date` (`post_date`) USING BTREE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
CREATE TABLE `blog_idx_auther` ( | |
`id` int(10) unsigned NOT NULL, | |
`auther` INT NOT NULL, | |
PRIMARY KEY (`id`), | |
INDEX `idx_blogs_by_auther` (`auther`) USING BTREE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment