• Jason

    (@galapogos01)


    Hi there,

    With this plugin installed, Query Monitor shows duplicate queries on wp_posts (the largest table on most installs).

    For every possible supported post type, the plugin calls schema_wp_cpt_get_enabled() which runs

    SELECT wp_posts.*
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_type = 'schema'
    AND ((wp_posts.post_status = 'publish'))
    ORDER BY wp_posts.post_date DESC

    This happens multiple times per admin page, eg. for audio, video, meta etc. Even if these schema types are disabled.

    Surely you can call it once and pass the array, saving some expensive queries?

    Cheers,
    Jason

  • The topic ‘Performance improvement – duplicate queries’ is closed to new replies.