phpsourcerer
Programmer
match/against doesnt find anything while like crashes the live server frequently ... live db has some 20000 rows (of 30 columns each); I´ve set up a test table with just for rows:
ID/match result/like result
1/0/1
2/0/0
3/0/1
4/0/1
It´s always 0 ... even if the column value is identical to the search parameter. Does anybody know a wayout that searches the table _fast_ and _reliable_?
Code:
CREATE TABLE `matchtest` (
`id` varchar(32) NOT NULL default '',
`title` varchar(255) default NULL,
`description` text,
PRIMARY KEY (`id`),
KEY `title` (`title`),
FULLTEXT KEY `description` (`description`)
);
INSERT INTO matchtest VALUES (1, 'something', 'blahblahblah ... newish ... moreblahblah');
INSERT INTO matchtest VALUES (2, 'some other thing', 'foobar ... good as new ... etcpp');
INSERT INTO matchtest VALUES (3, 'foobar', 'something newish');
INSERT INTO matchtest VALUES (4, 'test 4', 'newish');
select title, description
, MATCH (description) AGAINST ('newish')
, description like '%newish%'
from matchtest
ID/match result/like result
1/0/1
2/0/0
3/0/1
4/0/1
It´s always 0 ... even if the column value is identical to the search parameter. Does anybody know a wayout that searches the table _fast_ and _reliable_?