• Resolved donbowman

    (@donbowman)


    it appears this plugin uses SQL_CALC_FOUND_ROWS.

    This has 2 negative effects for me:

    1. when used w/ mysql it slows things down a lot
    2. when used with TIDB, it is not implemented and fills the logs with errors.
    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 )
    WHERE 1=1  AND (
    ( wp_postmeta.meta_key = '_nab_experiment_type' AND wp_postmeta.meta_value = 'nab/heatmap' )
    ...

    It would improve the perf if it would remove this (I think by adding no_found_rows to the query_vars).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Antonio Villegas

    (@avillegasn)

    Hi @donbowman,

    I couldn’t find any references to SQL_CALC_FOUND_ROWS in the source code of the plugin. It may be the case that we use a WordPress function that internally uses that? Do you have more information about where we are supposed to use it?

    Thanks!

    Thread Starter donbowman

    (@donbowman)

    Hi Antonio.

    Many aspects of wordpress have been working to remove this call. from core to plugins. it is added automatically by the framework if found rows is enabled.

    usually the fix is:

    $wp_query->query_vars['no_found_rows'] = 1;
    Plugin Author Antonio Villegas

    (@avillegasn)

    Ok. We will apply the fix in the next release.

    Plugin Author David Aguilera

    (@davilera)

    Thanks for the heads up, @donbowman. We’ve applied the fix in Nelio A/B Testing’s upcoming release: 6.0.0. Stay tuned for the update!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SQL_CALC_FOUND_ROWS in query’ is closed to new replies.