Forum Moderators: coopster
But as you will notice on the first search it takes up to 5-6 seconds to return results then every other search after the first is very fast...is it about the large MySQL database,or this has nothing to do,and it's up to my PHP scripts?
Thanks alot in advance!
[edited by: jatar_k at 11:38 pm (utc) on June 27, 2006]
[edit reason] no urls thanks [/edit]
Take a look at [mnogosearch.org...] - it is an Open Source search engine that runs well with Linux and MySQL. There are other such as Nutch and Datapark [dataparksearch.org...] which are also worth looking at.
One reason for the subsequent searches being faster is that the MySQL tables are loaded into RAM when the first query is executed. They are still in RAM when the other searches are executed. One of the rules with databases is that the more RAM you have, the better the database will run because the data will be resident in RAM and will not have to be continually swapped between harddrive and RAM.
I use MySQL with very large 100G+ databases dealing with domain name tracking. Some of the tables have around 4 million rows.
Regards...jmcc
One way that helps to speed this up is on the column that you are going to do most of your searching on create an index and a unique identifier. this made the search results so much quicker.
Also try using the 'EXPLAIN' comand in MySQL, for example 'EXPLAIN SELECT * FROM table WHERE ID1 = ID2'.. This will then give you details of how 'good' your query is. Have a look at this link..
[databasejournal.com...]