Приветствую.
Сразу к делу. Структура таблицы такая:
CREATE TABLE IF NOT EXISTS `board` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`cat` mediumint(2) NOT NULL,
`podcat` tinyint(3) NOT NULL,
`name` varchar(150) NOT NULL,
`name_translate` varchar(500) NOT NULL,
`file` char(50) NOT NULL,
`foto` char(50) NOT NULL,
`fotka` varchar(50) NOT NULL,
`screen` varchar(50) NOT NULL,
`size` varchar(10) NOT NULL,
`size_convert` char(10) NOT NULL,
`price` varchar(20) NOT NULL,
`telefon` varchar(15) NOT NULL,
`email` varchar(32) NOT NULL,
`contact` varchar(32) NOT NULL,
`send` enum('0','1') NOT NULL DEFAULT '0',
`city` varchar(32) NOT NULL,
`adress` varchar(250) NOT NULL,
`skype` varchar(32) NOT NULL,
`time` int(10) NOT NULL,
`timeupdate` int(10) NOT NULL,
`timesrok` int(10) NOT NULL,
`top` enum('0','1') NOT NULL DEFAULT '0',
`toptime` int(10) NOT NULL,
`srochno` enum('0','1') NOT NULL DEFAULT '0',
`timesrochno` int(11) NOT NULL,
`vydelit` enum('0','1') NOT NULL DEFAULT '0',
`timevydelit` int(10) NOT NULL,
`torg` enum('0','1') NOT NULL DEFAULT '0',
`by` enum('0','1') NOT NULL DEFAULT '0',
`free` enum('0','1') NOT NULL DEFAULT '0',
`status` enum('0','1','2') NOT NULL DEFAULT '2',
`convert` enum('0','1','2') NOT NULL DEFAULT '2',
`type` enum('1','2') NOT NULL,
`activation` enum('0','1') NOT NULL DEFAULT '0',
`count` int(11) NOT NULL,
`text` varchar(5000) NOT NULL,
`prosmotrov` int(11) NOT NULL,
`lat` char(11) NOT NULL,
`lng` char(11) NOT NULL,
`watermark` enum('0','1') NOT NULL,
`latp` char(11) NOT NULL,
`lngp` char(11) NOT NULL,
`deletetime` int(10) NOT NULL,
`delcount` enum('0','1') NOT NULL,
`folder` enum('0','1') NOT NULL,
PRIMARY KEY (`id`),
KEY `podcat` (`podcat`),
KEY `status` (`status`),
KEY `activation` (`activation`),
KEY `timesrok` (`timesrok`),
KEY `cat` (`cat`),
KEY `city` (`city`),
KEY `top` (`top`),
KEY `count` (`count`),
KEY `id_user` (`id_user`),
FULLTEXT KEY `search1` (`name`, `text`),
FULLTEXT KEY `adress` (`adress`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
SQL запрос
SELECT SQL_CALC_FOUND_ROWS `board`.*, (SELECT `id_board` FROM `favorites` WHERE `favorites`.`id_board`=`board`.`id` AND `id_user`='".$user['id']."' LIMIT 1) AS `fav`,
(SELECT `name` FROM `cat` WHERE `cat`.`id`=`board`.`cat`) AS `cat_name`,
(SELECT `name` FROM `cat` WHERE `cat`.`id`=`board`.`podcat`) AS `podcat_name`,
(SELECT `translate` FROM `city` WHERE `city`.`name`=`board`.`city`) AS `translate`,
(SELECT `namer` FROM `city` WHERE `city`.`name`=`board`.`city`) AS `city_r`,
(SELECT `translate` FROM `cat` WHERE `cat`.`id`=`board`.`cat`) AS `cat_translate` FROM `board` WHERE `cat`='".$cat['id']."' AND `status`='1' AND `top`='0' AND `activation`='0' AND `timesrok`>'".$realtime."' AND MATCH (name, text) AGAINST ('".rawurldecode(htmlspecialchars(trim($_COOKIE['search'])))."' IN BOOLEAN MODE)
Записей в таблице более 160 тысяч. Поиск по name и text выполняется 2 секунды. Можно это дело как то ускорить?