On a site with 80,000+ posts, SQL server crashes due to wp_query_args

Posted in: Newspaper
Post count: 2

This is probably perilously close to a dev request and I apologize for that.

The situation is that I’m working on optimizing a site with 80,000+ posts (adding around 100 a day). The site owner wants to have ‘recent posts’ on the footer of every page. I’m using the default flex block, and when we run tests it overloads the SQL server.

We were able to track it down to exactly one thing from td-composer (2.6 | built on 17.06.2020 8:12)

class td_data_source, static function shortcode_to_args

If I add 'no_found_rows' => true to this:


$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish'
);

then the SQL queries are much gentler and don’t crash. However this conflicts with pagination (which is likely why you don’t have it coded in there).

I believe a sustainable correction would be to check if there’s pagination enabled (since you can disable it in the blocks) and if NOT, to set that argument for WP_Query. That would enable everyone to improve speed without negatively impacting anything like pagination.

Post count: 18283

Hello !

I have passed your topic to our developers in order to take a look and we will see what they come back with.

Thank you for your understanding !

Post count: 2

Any updates? I’m not a super-fan of leaving this poor guy’s plugin edited in case there are needed updates. 🙂

Post count: 18283

Hello !

Our developers are working on this at the moment. Unfortunately we have no ETA for you.

Thank you !

Post count: 6

Hello sirs. How far on this. This delay is really killing business.

Post count: 405

Any update on this?

Post count: 35449

Hi,

This problem is on our list and our developers will handle it, it was checked by one of our developers and he discover that in some cases when you have a lots of posts the problem appears when the pagination is make.

Thank you for your understanding!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.