--
-- 表的结构 `phpcms_article_10`
--CREATE TABLE IF NOT EXISTS `phpcms_article_10` (
`articleid` int(10) unsigned NOT NULL auto_increment,
`catid` smallint(5) unsigned NOT NULL default '0',
`specialid` smallint(5) unsigned NOT NULL default '0',
`typeid` smallint(5) unsigned NOT NULL default '0',
`title` varchar(100) NOT NULL default '',
`titleintact` varchar(255) NOT NULL default '',
`subheading` varchar(255) NOT NULL default '',
`style` varchar(50) NOT NULL default '',
`showcommentlink` tinyint(1) unsigned NOT NULL default '0',
`introduce` text NOT NULL,
`keywords` varchar(100) NOT NULL default '',
`author` varchar(50) NOT NULL default '',
`copyfrom` varchar(255) NOT NULL default '',
`paginationtype` tinyint(1) NOT NULL default '0',
`maxcharperpage` smallint(5) unsigned NOT NULL default '0',
`hits` int(10) unsigned NOT NULL default '0',
`comments` int(10) unsigned NOT NULL default '0',
`thumb` varchar(255) NOT NULL default '',
`username` varchar(20) NOT NULL default '',
`addtime` int(10) unsigned NOT NULL default '0',
`editor` varchar(25) NOT NULL default '',
`edittime` int(10) unsigned NOT NULL default '0',
`checker` varchar(25) NOT NULL default '',
`checktime` int(10) unsigned NOT NULL default '0',
`templateid` varchar(20) NOT NULL default '0',
`skinid` varchar(20) NOT NULL default '0',
`arrposid` varchar(50) NOT NULL default '',
`status` tinyint(1) NOT NULL default '0',
`listorder` smallint(4) unsigned NOT NULL default '0',
`arrgroupidview` varchar(255) NOT NULL default '',
`readpoint` smallint(5) unsigned NOT NULL default '0',
`ishtml` tinyint(1) unsigned NOT NULL default '1',
`htmldir` varchar(20) NOT NULL default '',
`prefix` varchar(50) NOT NULL default '',
`urlruleid` tinyint(3) unsigned NOT NULL default '0',
`islink` tinyint(1) unsigned NOT NULL default '0',
`linkurl` varchar(255) NOT NULL default '',
PRIMARY KEY (`articleid`),
KEY `catid` (`catid`,`status`,`listorder`,`articleid`),
KEY `typeid` (`typeid`,`catid`,`status`,`listorder`,`articleid`),
KEY `username` (`username`(10)),
KEY `hits` (`status`,`hits`,`articleid`),
KEY `specialid` (`specialid`,`status`,`listorder`,`articleid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=1169 ;索引:希望ACMAIN_CHM大虾 帮忙解读一下。 谢谢啦
一个是用两个字段来生成索引,假设你有表如下,P为其物理位置
P | A B C
P001 | 2 5 1
P002 | 2 5 5
P003 | 1 2 2
P004 | 2 4 5
P005 | 2 5 4
P006 | 3 1 3
P007 | 3 5 3
P008 | 2 1 1
P009 | 5 3 5
P010 | 1 3 1
P011 | 5 4 2
P012 | 4 5 5
P013 | 4 5 1
P014 | 5 5 3
P015 | 5 4 5
P016 | 3 2 3
P017 | 1 5 3
P018 | 2 3 2
P019 | 5 2 3索引 (A)的内容则为
A P
1 P003
1 P010
1 P017
2 P001
2 P002
2 P004
2 P005
2 P008
2 P018
3 P006
3 P007
3 P016
4 P012
4 P013
5 P009
5 P011
5 P014
5 P015
5 P019 索引 (B,C)的内容则为
B C P
1 1 P008
1 3 P006
2 2 P003
2 3 P016
2 3 P019
3 1 P010
3 2 P018
3 5 P009
4 2 P011
4 5 P004
4 5 P015
5 1 P001
5 1 P013
5 3 P017
5 3 P007
5 3 P014
5 4 P005
5 5 P002
5 5 P012