Jump to content

search engine speed optimisation tips


nadeemshafi9

Recommended Posts

hello guys

 

I have a search engine that has been created by a third party, the engin maches the key word to the title of over 6 GB of small files so there are many. The engine then places teh resultant files names in an array, the engine then narrows the result down by labeling each element in the array with the best match and disguarding the rest up until a cirtain amount of results are left.

 

i think it is also reading the files for key words and i also think it is keeping keywords in the DB relating to files, i havent had a chance to take a long look yet.

 

there is also alot of object orientation PHP framwork around the database tables could this be slowing it down ?.

 

THE PROBLEM is it takes too long about 10 - 15 seconds, most of the calculation if not all is done in PHP rather than in SQL by the prior programmer.

 

if i convert it to SQL based calculations will it result in faster time?, i cant use proceedures as it is Mysql 4.

 

Any ideas from anyone at all, even if ur passing by this site and ur new to php.

 

Thanks guys

Link to comment
Share on other sites

also flat files are faster then any database.

 

BAD ADVICE

 

For this application, SQL is vastly superior to flat files, so the developer got that right.

 

As for what's slowing it down, it's hard to say without profiling.  Have you tried apd (a php profiler)?  It can be a little messy to setup, but it provides valuable data.  Another option is to make your own code to profile various parts of the processing, and find where the time is going.

 

The reason profiling is the place to start is so you don't waste time optimizing things that don't actually take much time.

 

Once you know what is slow, then it's time to look at moving those parts into mysql.

Link to comment
Share on other sites

thanks everyone, btherl, the developer has timed the overall proceedure but has not timed individual units i think this is where i will start, thanks m8ee, will definatly allow me to pinpoint the problem and is a must as a diagnosis, thanks again i cant belive i didnt consider that, but i think i rushed in to sulution. lol

Link to comment
Share on other sites

http://webscripts.softpedia.com/script/Snippets/MySQL-Database-Optimizer-9490.html

 

 

It is handy for optimizing tables in a MySQL database. Optimization helps prevent corruption and increases the

speed on you indexes.

 

never used this but speeds index up.

In what way is this better then the "optimize" function that is built into all versions of MySQL by default?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.