Topic: Whats the best way to do a search? (Read 665 times)
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« on: Feb 18, 2006, 10:41:32 AM »
I've got a database with a lot of articles and I want to add a search function to the website. What would be the best way to achieve this? The database size is still fairly small but will increase.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8362
43159 credits Members referred : 3
« Reply #1 on: Feb 18, 2006, 12:22:09 PM »
Well that depends.
The fastest way for the database, is by having some small VARCHAR fields in your table that indicate keywords.
Those fields should be indexes. But this way will not have the best results.
The best it would be if you would use the article's title or/and text, but this would create a huge overload on the server (that also depends of traffic of course), but you could do this better by creating some kind of cached results for the queries.