• Resolved krut1

    (@krut1)


    Hi people, your plugin (SmartCrawl v2.5.0) has a slow queries, that 48 hours works. This happens if you have 100 products and more than 50 keywords per each produkt.

    You has 48 times INNER JOIN in your logic. It ist not a good idea ??

    There is an example of your query:

    SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )  INNER JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id )  INNER JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id )  INNER JOIN wp_postmeta AS mt3 ON ( wp_posts.ID = mt3.post_id )  INNER JOIN wp_postmeta AS mt4 ON ( wp_posts.ID = mt4.post_id )  INNER JOIN wp_postmeta AS mt5 ON ( wp_posts.ID = mt5.post_id )  INNER JOIN wp_postmeta AS mt6 ON ( wp_posts.ID = mt6.post_id )  INNER JOIN wp_postmeta AS mt7 ON ( wp_posts.ID = mt7.post_id )  INNER JOIN wp_postmeta AS mt8 ON ( wp_posts.ID = mt8.post_id )  INNER JOIN wp_postmeta AS mt9 ON ( wp_posts.ID = mt9.post_id )  INNER JOIN wp_postmeta AS mt10 ON ( wp_posts.ID = mt10.post_id )  INNER JOIN wp_postmeta AS mt11 ON ( wp_posts.ID = mt11.post_id )  INNER JOIN wp_postmeta AS mt12 ON ( wp_posts.ID = mt12.post_id )  INNER JOIN wp_postmeta AS mt13 ON ( wp_posts.ID = mt13.post_id )  INNER JOIN wp_postmeta AS mt14 ON ( wp_posts.ID = mt14.post_id )  INNER JOIN wp_postmeta AS mt15 ON ( wp_posts.ID = mt15.post_id )  INNER JOIN wp_postmeta AS mt16 ON ( wp_posts.ID = mt16.post_id )  INNER JOIN wp_postmeta AS mt17 ON ( wp_posts.ID = mt17.post_id )  INNER JOIN wp_postmeta AS mt18 ON ( wp_posts.ID = mt18.post_id )  INNER JOIN wp_postmeta AS mt19 ON ( wp_posts.ID = mt19.post_id )  INNER JOIN wp_postmeta AS mt20 ON ( wp_posts.ID = mt20.post_id )  INNER JOIN wp_postmeta AS mt21 ON ( wp_posts.ID = mt21.post_id )  INNER JOIN wp_postmeta AS mt22 ON ( wp_posts.ID = mt22.post_id )  INNER JOIN wp_postmeta AS mt23 ON ( wp_posts.ID = mt23.post_id )  INNER JOIN wp_postmeta AS mt24 ON ( wp_posts.ID = mt24.post_id )  INNER JOIN wp_postmeta AS mt25 ON ( wp_posts.ID = mt25.post_id )  INNER JOIN wp_postmeta AS mt26 ON ( wp_posts.ID = mt26.post_id )  INNER JOIN wp_postmeta AS mt27 ON ( wp_posts.ID = mt27.post_id )  INNER JOIN wp_postmeta AS mt28 ON ( wp_posts.ID = mt28.post_id )  INNER JOIN wp_postmeta AS mt29 ON ( wp_posts.ID = mt29.post_id )  INNER JOIN wp_postmeta AS mt30 ON ( wp_posts.ID = mt30.post_id )  INNER JOIN wp_postmeta AS mt31 ON ( wp_posts.ID = mt31.post_id )  INNER JOIN wp_postmeta AS mt32 ON ( wp_posts.ID = mt32.post_id )  INNER JOIN wp_postmeta AS mt33 ON ( wp_posts.ID = mt33.post_id )  INNER JOIN wp_postmeta AS mt34 ON ( wp_posts.ID = mt34.post_id )  INNER JOIN wp_postmeta AS mt35 ON ( wp_posts.ID = mt35.post_id )  INNER JOIN wp_postmeta AS mt36 ON ( wp_posts.ID = mt36.post_id )  INNER JOIN wp_postmeta AS mt37 ON ( wp_posts.ID = mt37.post_id )  INNER JOIN wp_postmeta AS mt38 ON ( wp_posts.ID = mt38.post_id )  INNER JOIN wp_postmeta AS mt39 ON ( wp_posts.ID = mt39.post_id )  INNER JOIN wp_postmeta AS mt40 ON ( wp_posts.ID = mt40.post_id )  INNER JOIN wp_postmeta AS mt41 ON ( wp_posts.ID = mt41.post_id )  INNER JOIN wp_postmeta AS mt42 ON ( wp_posts.ID = mt42.post_id )  INNER JOIN wp_postmeta AS mt43 ON ( wp_posts.ID = mt43.post_id )  INNER JOIN wp_postmeta AS mt44 ON ( wp_posts.ID = mt44.post_id )  INNER JOIN wp_postmeta AS mt45 ON ( wp_posts.ID = mt45.post_id )  INNER JOIN wp_postmeta AS mt46 ON ( wp_posts.ID = mt46.post_id )  INNER JOIN wp_postmeta AS mt47 ON ( wp_posts.ID = mt47.post_id ) WHERE 1=1  AND wp_posts.ID NOT IN (1212) AND ( 
      ( 
        ( wp_postmeta.meta_key = '_wds_focus-keywords' AND wp_postmeta.meta_value LIKE '%natures%' ) 
        AND 
        ( mt1.meta_key = '_wds_focus-keywords' AND mt1.meta_value LIKE '%sunshine%' ) 
        AND 
        ( mt2.meta_key = '_wds_focus-keywords' AND mt2.meta_value LIKE '%belgien%' ) 
        AND 
        ( mt3.meta_key = '_wds_focus-keywords' AND mt3.meta_value LIKE '%bulgarien%' ) 
        AND 
        ( mt4.meta_key = '_wds_focus-keywords' AND mt4.meta_value LIKE '%finnland%' ) 
        AND 
        ( mt5.meta_key = '_wds_focus-keywords' AND mt5.meta_value LIKE '%frankreich%' ) 
        AND 
        ( mt6.meta_key = '_wds_focus-keywords' AND mt6.meta_value LIKE '%griechenland%' ) 
        AND 
        ( mt7.meta_key = '_wds_focus-keywords' AND mt7.meta_value LIKE '%italien%' ) 
        AND 
        ( mt8.meta_key = '_wds_focus-keywords' AND mt8.meta_value LIKE '%netherlands%' ) 
        AND 
        ( mt9.meta_key = '_wds_focus-keywords' AND mt9.meta_value LIKE '%niederlande%' ) 
        AND 
        ( mt10.meta_key = '_wds_focus-keywords' AND mt10.meta_value LIKE '%?sterreich%' ) 
        AND 
        ( mt11.meta_key = '_wds_focus-keywords' AND mt11.meta_value LIKE '%portugal%' ) 
        AND 
        ( mt12.meta_key = '_wds_focus-keywords' AND mt12.meta_value LIKE '%spanien%' ) 
        AND 
        ( mt13.meta_key = '_wds_focus-keywords' AND mt13.meta_value LIKE '%tschechische%' ) 
        AND 
        ( mt14.meta_key = '_wds_focus-keywords' AND mt14.meta_value LIKE '%republik%' ) 
        AND 
        ( mt15.meta_key = '_wds_focus-keywords' AND mt15.meta_value LIKE '%grecovital%' ) 
        AND 
        ( mt16.meta_key = '_wds_focus-keywords' AND mt16.meta_value LIKE '%synergy%' ) 
        AND 
        ( mt17.meta_key = '_wds_focus-keywords' AND mt17.meta_value LIKE '%wwwnaturessunshineeu%' ) 
        AND 
        ( mt18.meta_key = '_wds_focus-keywords' AND mt18.meta_value LIKE '%nahrungserg?nzung%' ) 
        AND 
        ( mt19.meta_key = '_wds_focus-keywords' AND mt19.meta_value LIKE '%lily%' ) 
        AND 
        ( mt20.meta_key = '_wds_focus-keywords' AND mt20.meta_value LIKE '%loaf%' ) 
        AND 
        ( mt21.meta_key = '_wds_focus-keywords' AND mt21.meta_value LIKE '%?therische%' ) 
        AND 
        ( mt22.meta_key = '_wds_focus-keywords' AND mt22.meta_value LIKE '%?le%' ) 
        AND 
        ( mt23.meta_key = '_wds_focus-keywords' AND mt23.meta_value LIKE '%doterra%' ) 
        AND 
        ( mt24.meta_key = '_wds_focus-keywords' AND mt24.meta_value LIKE '%wwwlilyandloafeu%' ) 
        AND 
        ( mt25.meta_key = '_wds_focus-keywords' AND mt25.meta_value LIKE '%wwwlilyandloafcom%' ) 
        AND 
        ( mt26.meta_key = '_wds_focus-keywords' AND mt26.meta_value LIKE '%wwwlilyandloafde%' ) 
        AND 
        ( mt27.meta_key = '_wds_focus-keywords' AND mt27.meta_value LIKE '%produkte%' ) 
        AND 
        ( mt28.meta_key = '_wds_focus-keywords' AND mt28.meta_value LIKE '%für%' ) 
        AND 
        ( mt29.meta_key = '_wds_focus-keywords' AND mt29.meta_value LIKE '%kinder%' ) 
        AND 
        ( mt30.meta_key = '_wds_focus-keywords' AND mt30.meta_value LIKE '%kinderprodukte%' ) 
        AND 
        ( mt31.meta_key = '_wds_focus-keywords' AND mt31.meta_value LIKE '%globaltradingservice%' ) 
        AND 
        ( mt32.meta_key = '_wds_focus-keywords' AND mt32.meta_value LIKE '%hautpflegeprodukte%' ) 
        AND 
        ( mt33.meta_key = '_wds_focus-keywords' AND mt33.meta_value LIKE '%tierprodukte%' ) 
        AND 
        ( mt34.meta_key = '_wds_focus-keywords' AND mt34.meta_value LIKE '%nutripets%' ) 
        AND 
        ( mt35.meta_key = '_wds_focus-keywords' AND mt35.meta_value LIKE '%naturessunshine24%' ) 
        AND 
        ( mt36.meta_key = '_wds_focus-keywords' AND mt36.meta_value LIKE '%nspshop24%' ) 
        AND 
        ( mt37.meta_key = '_wds_focus-keywords' AND mt37.meta_value LIKE '%naturessunshine%' ) 
        AND 
        ( mt38.meta_key = '_wds_focus-keywords' AND mt38.meta_value LIKE '%deutschland%' ) 
        AND 
        ( mt39.meta_key = '_wds_focus-keywords' AND mt39.meta_value LIKE '%angebot%' ) 
        AND 
        ( mt40.meta_key = '_wds_focus-keywords' AND mt40.meta_value LIKE '%global%' ) 
        AND 
        ( mt41.meta_key = '_wds_focus-keywords' AND mt41.meta_value LIKE '%trading%' ) 
        AND 
        ( mt42.meta_key = '_wds_focus-keywords' AND mt42.meta_value LIKE '%center%' ) 
        AND 
        ( mt43.meta_key = '_wds_focus-keywords' AND mt43.meta_value LIKE '%vitalproducts4you%' ) 
        AND 
        ( mt44.meta_key = '_wds_focus-keywords' AND mt44.meta_value LIKE '%define%' ) 
        AND 
        ( mt45.meta_key = '_wds_focus-keywords' AND mt45.meta_value LIKE '%body%' ) 
        AND 
        ( mt46.meta_key = '_wds_focus-keywords' AND mt46.meta_value LIKE '%balm%' ) 
        AND 
        ( mt47.meta_key = '_wds_focus-keywords' AND mt47.meta_value LIKE '%coq10%' )
      )
    ) AND wp_posts.post_type IN ('post', 'page', 'attachment', 'product') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'wc-authorization' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10

    Can you please fix it?

    • This topic was modified 4 years, 9 months ago by krut1.
    • This topic was modified 4 years, 9 months ago by krut1.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘SmartCrawl WordPress SEO (slow SQL queries)’ is closed to new replies.