How do I split a large query with a semi-expensive function included into multiple smaller queries
Yes, using ‘posts_per_page’ => -1 is a bad practice as it loads every matching post from the database, which can mean hundreds, thousands or millions of entries in the worst case. And it looks like you only need post ID’s in your code, not the whole post objects. This means you can slim down the … Read more