DROP TABLE IF EXISTS `search`; CREATE TABLE `search` ( `searchWord` char(20) NOT NULL, `searchWordId` mediumint(9) NOT NULL, `vn` int(11) NOT NULL, `bc` smallint(6) NOT NULL, UNIQUE KEY `word_key` (`searchWord`,`searchWordId`,`vn`,`bc`), KEY `vnbc` (`vn`,`bc`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PARTITION BY KEY (searchWord,vn) PARTITIONS 50 ; --disable_query_log INSERT INTO `search` VALUES ('\n',3651641,206739,-6781),('',3381364,206739,-10639),(' 1997-2007',7488817,206739,-24592),(' 5.1 Re',2044266,206739,5719),(' co',-7926782,206739,29239),(' copy of this d',2885361,206739,-3571),(' distributed',-7238919,206739,-1678),(' docu',8319662,206739,-20458),(' GP',6372832,206739,27411),(' is NOT distr',-2869558,206739,-25720),(' is subject to the',5466274,206739,-18435),(' license.',-3000605,206739,-25861),(' Manual\n',-2484123,206739,-29740),(' MySQL AB\n',-7865051,206739,22454),(' printed copy of th',7426091,206739,10415),(' Re',6456121,206739,-15410),(' Referenc',-3219499,206739,-31008),(' solely for your',-1275365,206739,2268),(' terms: You',8301239,206739,25369),(' this doc',6109516,206739,-2644),(' to the followin',7835076,206739,31933),(' You',-7542273,206739,10007),('. Use of this do',6086457,206739,21699),('0',-7101307,206739,-8835),('0',203837,206739,-9279),('0',1011930,206739,-20900),('0',8189085,206739,-2484),('1997-2007 MySQL AB\n',-2383570,206739,-6733),('7',1386561,206739,25502),('997-2007',6741957,206739,22259),('a printed copy of t',3155366,206739,32727),('anual\n',5961466,206739,11018),('ation is',4743241,206739,6806),('ation is su',-548394,206739,-31705),('bject to the fo',-6747732,206739,7249),('cumen',2130902,206739,-4201),('d co',-2323608,206739,602),('d under a GPL licen',7132174,206739,-6435),('documenta',-8337791,206739,-8072),('documentatio',-5398082,206739,-17984),('e following ter',238327,206739,24037),('e Man',-5560286,206739,-31321),('ed un',-2999826,206739,15532),('efere',-7721274,206739,-22276),('ely for your ow',4004147,206739,32646),('ense. Use',6118622,206739,-15628),('erence Manual\n',950485,206739,23127),('erms: You may c',-6044408,206739,12297),('he',6936368,206739,13668),('his',-3396104,206739,-708),('i',3018398,206739,-20494),('ibuted',2309859,206739,-11888),('ibuted u',-2199181,206739,-9993),('ibuted under',1559786,206739,-21333),('ibuted under a G',-7775458,206739,-30885),('ing t',-4543955,206739,-2526),('ion is NOT di',-5780661,206739,7174),('ion is NOT distr',6907501,206739,16022),('ion solely for you',-5046296,206739,-26268),('is document',2922175,206739,164),('ject to the fol',5874213,206739,31900),('l',-8200638,206739,-20024),('L A',-5095727,206739,24704),('license. Use of th',-2368702,206739,29508),('lowing terms',7683176,206739,12385),('menta',1348483,206739,-32287),('mentation is NO',6430536,206739,-5460),('mentation is subje',7014547,206739,-17054),('ms: You m',-7114464,206739,-15512),('ms: You may crea',-4227045,206739,31052),('n',268761,206739,11950),('n is subject to th',12055,206739,26607),('ntation i',-2191523,206739,-17342),('o',6262031,206739,-13056),('ocumentati',-6410581,206739,19590),('ollowing term',-7011802,206739,-17097),('on solely for y',5192273,206739,12091),('on solely for your',7549443,206739,-4514),('ou may creat',6438296,206739,4546),('pyright 1997-2007 M',2373929,206739,25564),('QL',437802,206739,-2974),('QL 5',-8377706,206739,-5029),('s NOT dis',-7721772,206739,18466),('s NOT dis',6443007,206739,-12357),('t to th',-4050661,206739,27221),('tation is NOT distr',2578703,206739,-31203),('tation is subject',-3489711,206739,-3501),('tation sol',4085516,206739,-12401),('terms: You ma',-6136519,206739,4019),('the f',-605606,206739,-27052),('This docume',914459,206739,32365),('this docume',6812188,206739,-30018),('tio',2211607,206739,3031),('u may c',3971228,206739,4274),('ual\n',-1208789,206739,-32280),('Use',1091583,206739,-18689),('Use of this docu',-5231698,206739,-22653),('uted under a GPL l',-4006020,206739,27901),('wing terms:',-5630369,206739,21363),('y',6802634,206739,21194); --enable_query_log select distinct vn,bc from search where vn=206739 and bc != 0; select distinct bc from search where vn=206739 and bc != 0; select distinct vn from search where vn=206739 and bc != 0;