Suggestions on making this query/code more performant
In answering my own question I have decide to go the pure SQL query route as WP runs too many queries in fetching a post and its attached post thumbnail, in addition to fetching and building meta for that thumbnail. Here is the code I ended up with: $query2 = “SELECT post.ID, post.post_title, thumbnail_url.meta_value as … Read more