please i want to make a search system for my website

i have 2 ideas
1- the first one is to search in my phpmyadmin tables and columns but it takes a very long time to get result

2- my second idea is to make an XML file using cron job and search in it when the user press search..

can anyone tell me which idea is better?? and if anyone has another idea please advice