Forum Moderators: phranque
I have a website and in the last couple of years it has grown and so the amount of data. When I contacted the hosting company, they told me that using Indexes will solve the problem. Is here anybody who could help me to solve this problem? I will also copy the structure of the table that got this problem:
CREATE TABLE `news` (
`id` int(11) NOT NULL auto_increment,
`headline` varchar(80) default NULL,
`author` varchar(80) default NULL,
`category` varchar(80) default NULL,
`picture` varchar(120) default NULL,
`datum2` timestamp(14) NOT NULL,
`datum` timestamp(14) NOT NULL default '00000000000000',
`preview` text,
`tekst` text,
`story` int(11) NOT NULL default '0',
`views` int(11) default NULL,
`type` tinyint(4) NOT NULL default '1',
`lang` tinytext NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1611 ;
I will be very thankful if someone can help me solve this problem.
Sincerely,
Sam
While you are reading up on OPTIMIZE TABLE [dev.mysql.com], have a read through the section on the Speed of SELECT Queries [dev.mysql.com]. You'll find a link in there instructing
How MySQL Uses Indexesas well as some general tips for speeding up queries on MyISAM tables.