kaisellgren
08-01-2008, 02:06 PM
Hi,
Maybe a stupid questions for you guys, but I'm not a database expert, just PHP security expert :)
The only query I run on my site is:
SELECT * FROM table WHERE blah blah
I have replaced the * with the column names, but in reality it shouldn't matter, because I need to fetch every column information. Even the ID must be fetched... so my question is, is it worth adding INDEX(id), INDEX(name), etc for each column? The where clause uses only name column to match for... so perhaps I just INDEX the name column then?
Also... does anyone know how to use % -sign in FULLTEXT's AGAINST() function? Like MATCH(name) AGAINST ('%something%') ?
Thank you a lot for your help!
Maybe a stupid questions for you guys, but I'm not a database expert, just PHP security expert :)
The only query I run on my site is:
SELECT * FROM table WHERE blah blah
I have replaced the * with the column names, but in reality it shouldn't matter, because I need to fetch every column information. Even the ID must be fetched... so my question is, is it worth adding INDEX(id), INDEX(name), etc for each column? The where clause uses only name column to match for... so perhaps I just INDEX the name column then?
Also... does anyone know how to use % -sign in FULLTEXT's AGAINST() function? Like MATCH(name) AGAINST ('%something%') ?
Thank you a lot for your help!