Hi All (please help)
my mysql DB uas a table of the following structure:
CREATE TABLE IF NOT EXISTS content
(
VID
bigint(20) NOT NULL auto_increment,
UID
bigint(20) NOT NULL default ‘0’,
provider
char(2) default NULL,
title
varchar(120) NOT NULL default ‘’,
description
text NOT NULL,
featuredesc
text NOT NULL,
keyword
text NOT NULL,
channel
varchar(255) NOT NULL default ‘0|’,
vdoname
varchar(40) NOT NULL default ‘’,
flvdoname
varchar(40) default NULL,
adult
char(3) default ‘no’,
duration
float NOT NULL default ‘0’,
space
bigint(20) NOT NULL default ‘0’,
type
varchar(7) NOT NULL default ‘’,
addtime
varchar(20) default NULL,
adddate
date NOT NULL default ‘0000-00-00’,
record_date
date NOT NULL default ‘0000-00-00’,
location
text NOT NULL,
country
varchar(120) NOT NULL default ‘’,
vkey
varchar(20) NOT NULL default ‘’,
viewnumber
bigint(10) NOT NULL default ‘0’,
viewtime
datetime NOT NULL default ‘0000-00-00 00:00:00’,
com_num
int(cool: NOT NULL default ‘0’,
fav_num
int(cool: NOT NULL default ‘0’,
featured
char(3) NOT NULL default ‘no’,
ratedby
bigint(10) NOT NULL default ‘0’,
rate
float NOT NULL default ‘0’,
filehome
varchar(120) NOT NULL default ‘’,
be_comment
char(3) NOT NULL default ‘yes’,
be_rated
char(3) NOT NULL default ‘yes’,
embed
varchar(cool: NOT NULL default ‘enabled’,
voter_id
varchar(200) NOT NULL default ‘’,
contentowner
varchar(120) default NULL,
adurl
varchar(255) default NULL,
admsg
text,
AnonName
varchar(255) default ‘anonymous’,
PRIMARY KEY (VID
),
UNIQUE KEY vkey
(vkey
),
KEY VID
(VID
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=79890 ;
when i search this table using PHP using simple queries, my CPU utilisation grows exponentially. just 1 search query on this table causes my CPU to spike to 30%… and when i have multiple queries the CPU utilisation grows to 300%…
could somone help me optimise this table please…
(the number of rows in this table is > 100K)