Howto database. desc howtos ; +-------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | name | varchar(40) | YES | | NULL | | | doc | mediumtext | YES | | NULL | | +-------+-------------+------+-----+---------+----------------+ Need medium text because some docs are more than the 64KB max that Text can be. Build the file that will be the LOAD DATA INFILE. This file contains the filenames and the contents of all the Howto files. Format: filename dfw2 contents of that file dfwdfw (dfw2 is field seperator, dfwdfw is row seperator.) $ for i in * ;do echo $i dfw2;cat $i;echo dfwdfw ;done >../allhowtos create it in different directory else is in the file. use dfw2 as field delimiter because some files have dfw string. $ mysql -e "load data local infile '../allhowtos' into table howtos fields terminated by 'dfw2' lines terminated by 'dfwdfw\n' (name,doc);" howtos Check: select id,name,length(doc) from howtos; select count(*) from howtos where doc like '%apache%'; .59 sec select * from howtos where id=12\G now create a fulltext index on the table's doc column. and do some Matching