I have over 10,000 posts on a site which all need to have a tag added to them. WP_Query is either running out of memory or timing out on my server and in the past running large queries with this function, i've had my MySQL query limit reached with similar functions
I know I can't use WP_Query and wp_set_post_tags efficiently, and i'm sure it can be done with wpdb without as many queries to the database. There's only one tag which needs to be added to each post.
How can it be done with a wpdb query?