Support » Plugin: Business Directory Plugin » MySQL query on _wpbdp runs forever

  • Resolved ecotechie


    My host temporarily shut down my page yesterday. It told me that this query was taking too many resources on the server.

    Any thoughts on what this means?

    SELECT zd5ac137n_posts.ID FROM zd5ac137n_posts LEFT JOIN zd5ac137n_postmeta AS zd5ac137n_postmeta ON zd5ac137n_posts.ID = zd5ac137n_postmeta.post_id LEFT JOIN zd5ac137n_postmeta AS t_1 ON zd5ac137n_posts.ID = t_1.post_id LEFT JOIN zd5ac137n_postmeta AS t_2 ON zd5ac137n_posts.ID = t_2.post_id LEFT JOIN zd5ac137n_postmeta AS t_3 ON zd5ac137n_posts.ID = t_3.post_id LEFT JOIN zd5ac137n_postmeta AS t_4 ON zd5ac137n_posts.ID = t_4.post_id LEFT JOIN zd5ac137n_postmeta AS t_5 ON zd5ac137n_posts.ID = t_5.post_id LEFT JOIN zd5ac137n_postmeta AS t_6 ON zd5ac137n_posts.ID = t_6.post_id LEFT JOIN zd5ac137n_postmeta AS t_7 ON zd5ac137n_posts.ID = t_7.post_id LEFT JOIN zd5ac137n_postmeta AS t_8 ON zd5ac137n_posts.ID = t_8.post_id LEFT JOIN zd5ac137n_postmeta AS t_9 ON zd5ac137n_posts.ID = t_9.post_id WHERE (zd5ac137n_posts.post_type = ‘wpbdp_listing’ AND zd5ac137n_posts.post_status = ‘publish’) AND (1=1 AND (1=0 OR zd5ac137n_posts.post_title LIKE ‘%palo%’ OR (zd5ac137n_postmeta.meta_key = ‘_wpbdp[f
    ields][11]’ AND zd5ac137n_postmeta.meta_value LIKE ‘%palo%’) OR t_1.meta_key = ‘_wpbdp[fields][2]’ AND t_1.meta_value REGEXP ‘(palo){1}([tab]{0,1})’ OR t_2.meta_key = ‘_wpbdp[fields][12]’ AND t_2.meta_value REGEXP ‘(palo){1}([tab]{0,1})’ OR zd5ac137n_posts.post_content LIKE ‘%palo%’ OR (t_3.meta_key = ‘_wpbdp[fields][8]’ AND t_3.meta_value LIKE ‘%palo%’) OR t_4.meta_key = ‘_wpbdp[fields][15]’ AND t_4.meta_value REGEXP ‘(palo){1}([tab]{0,1})’ OR 1=0) AND (1=0 OR zd5ac137n_posts.post_title LIKE ‘%alto%’ OR (t_5.meta_key = ‘_wpbdp[fields][11]’ AND t_5.meta_value LIKE ‘%alto%’) OR t_6.meta_key = ‘_wpbdp[fields][2]’ AND t_6.meta_value REGEXP ‘(alto){1}([tab]{0,1})’ OR t_7.meta_key = ‘_wpbdp[fields][12]’ AND t_7.meta_value REGEXP ‘(alto){1}([tab]{0,1})’ OR zd5ac137n_posts.post_content LIKE ‘%alto%’ OR (t_8.meta_key = ‘_wpbdp[fields][8]’ AND t_8.meta_value LIKE ‘%alto%’) OR t_9.meta_key = ‘_wpbdp[fields][15]’ AND t_9.meta_value REGEXP ‘(alto){1}([tab]{0,1})’ OR 1=0)) GROUP BY zd5ac137n_pos

Viewing 1 replies (of 1 total)
  • Plugin Author businessdirectoryplugin


    Hi seedsca,

    Sorry that you ran into issues here!

    Sounds like you have a search issue. You didn’t say where the search was coming from–but I’ll take a guess and say the top of the directory search back. That’s called “Quick Search” for us.

    From the sound of it, you’ve configured your Quick Search to use too many joins and that’s causing issues on your database. Most databases aren’t able to withstand that kind of JOIN clause, so we have a setting to limit what you add in that for the Quick search under Directory Admin->Manage Options, General tab under “Quick Search”. You’ll want to reduce the number of fields you check in this option to a bare minimum since it sounds like your database can’t handle that. We recommend title, description and category as a starting point.

    Try that and let me know if you run into more issues.

Viewing 1 replies (of 1 total)
  • The topic ‘MySQL query on _wpbdp runs forever’ is closed to new replies.