PDA

View Full Version : Indexed searches


devenh
6th of April 2005 (Wed), 08:46
Are any of the searches performed using indexes? If not, will they be in 1.5?

I do event photography and a typical gallery will have 300 photos. I include the competitors names and provide a drop down combo box where customers can select the name and perform a search. The name is contained in the Free Text Info field.

Whenever I open a new gallery my server utilization goes way up and I *suspect* that it is because EE is performing unindexed searches in a memo field in the gallery. Here is the html code I use:

action="gallery/list.php?exhibition=105&search_row=ee_photo_eng.ee_photo_text"

So the search is restricted to the gallery, but this still means reading 300 records each time. Are there any better (more efficient) ways to do this?

Deven

Pekka
6th of April 2005 (Wed), 18:52
No, searches are not Indexed by EE. They are pure SQL queries. I have not noticed any CPU peaks on my gallery search, to me it sounds like a disk i/o slowdown more than CPU usage. The data amounts are so small that the search uses very little resources even if you have 10000 photos.

You can speed search up by installing MySQL 4. With that you should enable query cache (resource saving and speed benefit is significant).

I'll have look how http://dev.mysql.com/doc/mysql/en/fulltext-search.html would make things faster - in theory it does but how it would work in real life must be tested.