Forums Forums Search & Filter Pro Performance Issues with S&F Pro and WPML

Tagged: ,

Viewing 10 posts - 1 through 10 (of 25 total)
  • Anonymous
    #269732

    Hello,

    I experienced some major performance problems when using S&F pro with WPML

    I am using a the shortcode method with a search and a date filed. I only select one type of custom post types.
    The complete WP installation has about 17000 other entries of different post types, which are all indexed but not selected for this query.

    The selected custom post type only has 30 entries.

    On the default language WP does some limited queries and it has an overall expected good performance.

    On the second language it does the following query for every single post. Even if they belong to post typ that is not selected for this result.

    SELECT wpml_translations.translation_id, wpml_translations.element_id, wpml_translations.language_code, wpml_translations.source_language_code, wpml_translations.trid, wpml_translations.element_type
    FROM wp_icl_translations wpml_translations JOIN wp_posts p
    ON wpml_translations.element_id = p.ID
    AND wpml_translations.element_type = CONCAT('post_', p.post_type) JOIN wp_icl_translations tridt
    ON tridt.element_type = wpml_translations.element_type
    AND tridt.trid = wpml_translations.trid
    WHERE tridt.trid = (SELECT trid
    FROM wp_icl_translations wpml_translations JOIN wp_posts p
    ON wpml_translations.element_id = p.ID
    AND wpml_translations.element_type = CONCAT('post_', p.post_type)
    WHERE element_id = 19588
    LIMIT 1)

    So this happens over 17000 times which leads to a take 10 sec to display no entries (i don’t have any entries in that language yet). On the main language page it does not do this.

    And then there is this query. It is only done a few times but it is huge. It uses all the 17k in the “AND wp_posts.ID IN ” part. it is also done once on the default language page.

    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
    FROM wp_posts JOIN wp_icl_translations wpml_translations
    ON wp_posts.ID = wpml_translations.element_id
    AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type)
    WHERE 1=1
    AND wp_posts.ID IN (3,34,532, ... all the 17k post ids ... ,569,611,35712,34278)
    AND wp_posts.post_type = 'presseinfo'
    AND ((wp_posts.post_status = 'publish'))
    AND ( ( ( wpml_translations.language_code = 'en'
    OR 0 )
    AND wp_posts.post_type IN ('post','page','attachment','wp_block','befragungen','presseinfo','iab_filter_groups','search-filter-widget' ) )
    OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','befragungen','presseinfo','iab_filter_groups','search-filter-widget' ) )
    ORDER BY wp_posts.menu_order, wp_posts.post_date DESC
    LIMIT 0, 20

    Any suggestions why this happens?

    Thank you very much in advanced

    Trevor
    #269738
    This reply has been marked as private.
    Anonymous
    #271947
    This reply has been marked as private.
    Ross Moderator
    #272588
    This reply has been marked as private.
    Anonymous
    #272783
    This reply has been marked as private.
    Ross Moderator
    #273239
    This reply has been marked as private.
    Ross Moderator
    #273549
    This reply has been marked as private.
    Anonymous
    #273598
    This reply has been marked as private.
    Ross Moderator
    #274588
    This reply has been marked as private.
    Anonymous
    #275720
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 25 total)