Jump to content

j1982

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

j1982's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the detailed reply! I've taken your advice on board for a smaller app I'm working on at work; your suggestions have been very valuable for that, so thanks Given the requirements of the autosuggest functionality, the "..where row like x%" method isn't going to work anyway. I've been looking into it a bit more, and it looks like Solr is going to provide the most useful search functionality (ie faceted search, etc).
  2. Thanks Thorpe & Scootstah, I was (somehow) under the impression that the connection remained open until it was manually closed! Good to know that's not the case. Jstrike> Thank you very much for the detailed suggestion. Really appreciate it. I'm not familiar with daemon's & how that might operate. Have done some searching on it, and found something called "Solr" which might be another option to look into.. Having said that, the table which would be searched in my original method would (obviously) have an index on the text being searched, and there is only one field being searched by the 'like' statement & a limit of 10 results. When you say it would be slow with multiple users & multiple searches being performed, are we talking many seconds? Or an extra .0xx of a second over a more efficient method? (generally speaking - obviously this is dependant on system config)
  3. Hi, I've done a lot of searching on this topic, but different websites seem to give different recommendations. There are two basic parts of functionality to a business application I'm working on: 1- A search box. When a user types in it, it will display a list of suggestions (using java/ajax). 2- A display area. Once the user has completed the search (ie clicked one of the suggestions), more details about the searched item will be displayed. My question is - what would be the best way to handle the connections to MYSQL when performing the auto-suggest? For example - when the search box is typed in, ajax will call "getsuggestion.php" passing the current search string. This file will then connect to the database, search for the value the user has typed, then send the results back to ajax & be displayed to the user. What I'm really wanting to know, is should "getsuggestion.php" open AND close the mysql connection each time it is called? Or should I not be closing the connection? I'm asking this because the application will be used by potentially >1000 people at the company I work for, and I don't want there to be database connectivity issues - or speed issues when performing the autosuggest. Any hints/tips would be greatly appreciated. Thanks
×
×
  • 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.