wp_posts query slowing down my website

Although a quarter of second is quite slow to query a single post from db, I’m convinced that this is not your only issue. I also use the Query Monitor plugin, but I have never really taken note when does the plugin redline a query as being slow. But that is not the point here.

Because one tend to focus on something as explicit as a red line, one redline query can mask 100 queries that are just below radar which combined can add up to a couple of seconds loading time. You need to take all of this into consideration. On average, a page should not be doing more than 30 queries, anything more than this should be investigated. Make sure that you look at the big picture and check how many queries is actually performed on a page load and the time that is spend to run all of these queries.

It should be noted, apart from just looking at queries, there are many other parts of the puzzle that adds up to how fast or how slow a page load. Loading scripts, styles, images, elaborate background and header images, fonts, the size of the db, type of date, etc etc, this is all factors that can slow pages down. Then there is the server you are on as well. Crappy low cost hosts uses low budget servers that are slow, specially when loaded.

Optimizing a site to load faster is an intensive process that cannot be discussed here. IMHO, it is better to hire a professional to examine your entire site (db, theme, plugins, server, data, etc etc) and how it is setup and how everything integrates into one another, and then based on that give specific solutions to your issues.

Just a quick note, optimization usually involves like minifying scripts, caching styles, query results, page content, adding heavy queries into transients, that kind of stuff. As for your exact question, what the query in OP does is a mystery to me as I do not know the setup of your site and page. If this query is performed by the theme itself, you should call the author. As for optimization, you can always add the query in a transient or cache the result from the query, but as I said, a specific solution would require knowledge of the theme and what the query exactly does in the context of the theme or page