Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Advanced Search Performance Improvments

  1. #1
    Thread Starter
    Newbie primaltalk's Avatar
    Join Date
    May 2011
    Location
    United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 5 Times in 2 Posts

    Advanced Search Performance Improvments

    I've got a site with over 17000 ads on it and advanced (refined) search has been very slow - over 30 seconds for the majority of searches. Perusing the forums, it seems a number of others have the same problem.

    I have the W3 Total cache plugin installed using the opcode page cache, which improved general site performance a great deal (thanks to the forums for the recommendation), but not advanced search - which I would expect, as the majority of the advanced searches would not be pre-cached.

    I've had a look through the database architecture and how it's used and have come to what I think is a pretty inevitable conclusion. Classipress stores most ad fields within the wp_postmeta table, where each row represents a single field. While this might make sense from the point of view of making it easier to code for custom fields, from a performance perspective it sucks no end when you try to query it.

    I have extended the Classipress plugin and created tables for my ads that are appropriately designed and indexed for the data I have. The immediate effect was to take advanced search queries from over 30 seconds, to under 3. That's over an order of magnitude improvement directly resulting from designing the database appropriately for the data I have.

    If Classipress is ever going to be useful out-of-the-box for sites with a reasonably large number of ads, some serious work is going to have to be done in the way the database is architected. This will mean more code to manipulate the structure of the database to deal with custom fields, but I think it's inevitable if performance is ever going to be reasonable.

    One immediate recommendation I have - even without changing the database design - is to move the location search code from the pre-posts filter to the join filter. It'll cut down on a query and should make location-based searches much faster.

  2. The Following 3 Users Say Thank You to primaltalk For This Useful Post:

    dikiyforester (November 30th, 2011), rubencio (December 1st, 2011), scribu (November 30th, 2011)

  3. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,958
    Thanks
    169
    Thanked 3,405 Times in 3,276 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  4. #3
    Senior Developer, AppThemes scribu's Avatar
    Join Date
    Jun 2011
    Posts
    50
    Thanks
    3
    Thanked 11 Times in 11 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Senior Developer, AppThemes scribu's Avatar
    Join Date
    Jun 2011
    Posts
    50
    Thanks
    3
    Thanked 11 Times in 11 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    Member whitefox's Avatar
    Join Date
    Dec 2010
    Location
    Philippines
    Posts
    76
    Thanks
    1
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #6
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,958
    Thanks
    169
    Thanked 3,405 Times in 3,276 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  8. #7
    Member whitefox's Avatar
    Join Date
    Dec 2010
    Location
    Philippines
    Posts
    76
    Thanks
    1
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. The Following User Says Thank You to whitefox For This Useful Post:

    silver (April 30th, 2012)

  10. #8
    Member silver's Avatar
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    78
    Thanks
    11
    Thanked 7 Times in 4 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  11. #9
    gr8wan's Avatar
    Join Date
    Dec 2011
    Location
    United States
    Posts
    46
    Thanks
    3
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  12. #10
    Member silver's Avatar
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    78
    Thanks
    11
    Thanked 7 Times in 4 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search Filter - advanced search feature
    By davidvdberg in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: August 19th, 2012, 02:04 PM
  2. Advanced Search
    By cadevipriya in forum ClassiPress General Discussion
    Replies: 1
    Last Post: October 28th, 2011, 06:27 PM
  3. Advanced Search
    By bundyla in forum ClassiPress General Discussion
    Replies: 6
    Last Post: July 28th, 2011, 04:12 PM