I'm going to add simple live search to website (tips while entering text in input box).
Main task:
- 39k plain text lines for search into (~500 length of each line, 4Mb total size)
- 1k online users can simultaneously typing something in inputbox
- In some cases 2k-3k resuts can match user request
I'm worried about the following questions:
- Database VS textfile?
- Are there any general rules or best practices related to my task aimed for decreasing db/server memory load? (caching/indexing/etc)
- Do Sphinx/Solr are appropriate for such task?
Any links/advice will be extremely helpful.
Thanks
P.S. May be this is the best solution? PHP to search within txt file and echo the whole line