Query load my database

This topic contains 4 replies, has 3 voices, and was last updated by  Kiran 4 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #516884

    Jorge Adrian Urrego Acosta
    Full Member
    Post count: 22

    Hello!!
    A few weeks ago one query is loading my database, this runs many times in parallel. I think is related to sitemap generation (Yoast seo) but is a particular geodirectory table (maybe poor optimized). Please help me, my site is broken.

    -- Connection Id: 772312
    -- User: direccionconsu
    -- Host: localhost
    -- DB: direccion2017
    -- Command: Query
    -- Time: 5002
    -- State: Sending data
    SELECT tt.term_id, MAX(p.post_modified_gmt) AS date_gmt, l.country_slug AS country, l.region_slug AS region FROM wp_geodir_post_locations l LEFT JOIN wp_geodir_gd_place_detail pd ON ( pd.country = l.country AND pd.region = l.region ) LEFT JOIN wp_posts p ON p.ID = pd.post_id LEFT JOIN 
    wp_term_relationships

    AS tr ON tr.object_id = p.ID LEFT JOIN

    wp_term_taxonomy

    AS tt ON ( tt.term_taxonomy_id = tr.term_taxonomy_id AND tt.taxonomy = 'gd_place_tags' ) WHERE p.post_type = 'gd_place' AND p.post_status = 'publish' AND l.location_id IS NOT NULL AND tt.term_id IS NOT NULL AND l.country_slug LIKE 'colombia' GROUP BY CONCAT(tt.term_id, '-', l.country_slug, '-', l.region_slug) ORDER BY date_gmt DESC

    PD:Please don’t suggest cache queries in the database, it is not possible in my case.

    #517019

    Paolo
    Site Admin
    Post count: 31206

    Hi Jorge,

    I’ve flagged your request for a developer. He’ll get back to you asap.

    Thanks for your patience,

    #517091

    Kiran
    Moderator
    Post count: 7069

    Hi Jorge,

    1) Un-tick following options from GeoDirectory > Settings > Locations > Settings
    – Exclude categories location pages in xml sitemap
    – Exclude tags location pages in xml sitemap

    2) Re-save settings from SEO > General > Features > XML sitemaps

    Let us know how it goes.

    Thanks,
    Kiran

    #517520

    Jorge Adrian Urrego Acosta
    Full Member
    Post count: 22

    Hi Kiran, Paolo.
    The slow query disappeared, but exclude categories or tag is not a good solution for me, they are very good positioned on search engines.

    #518121

    Kiran
    Moderator
    Post count: 7069

    Hi Jorge,

    Categories/tags + location sitemap uses join queries with 4 database tables to retrieve and generate sitemap. Some servers takes more time than expected when there is large amount of data in tables.

    We will check if there alternative way(like caching) allowed in Yoast sitemap generation so we can prevent running queries multiple times.

    Kiran

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket