Forum Moderators: coopster

Message Too Old, No Replies

searching mysql .. need advice.

         

webnoob

4:41 pm on May 26, 2005 (gmt 0)

10+ Year Member



i posted this on the phplist and i've yet to receive a response, so i hope someone here can help.

i am looking to make a search engine to search mysql (fulltext, boolean, etc), the core of the script is complete but i am a little confused when thinking of the best way to span the results through multiple pages (paginate).

i am trying to avoid searching the db again each time the user views a different page result set. i can create a pagination function with no problem... just figuring out how to span the results without performing ANOTHER search on the db is the problem.. i was thinking i could insert the results into a temp table then paginate those results instead.. but that might be overkill because of the extra overhead/queries, especially if a search returns a lot of results.

since switching to another paged result set i would have to re-run the MATCH() AGAINST() queries yet again, which im trying to avoid, how can i come up with a work-around? been thinking about it for a couple days and i've yet to come up with any ideas/solution.

can someone give me some ideas/suggestion?

ergophobe

5:06 pm on May 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You'll still have to query the temp table and you have all the overhead of creating the table and whatnot.

The main this is to be sure that the fields that you are selecting on in your WHERE or JOIN clauses are indexed.