Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizing your WP_Query queries for better performance #128

Open
bph opened this issue Jun 2, 2023 Discussed in #27 · 4 comments
Open

Optimizing your WP_Query queries for better performance #128

bph opened this issue Jun 2, 2023 Discussed in #27 · 4 comments
Assignees
Labels

Comments

@bph
Copy link
Collaborator

bph commented Jun 2, 2023

Discussed in #27

Originally posted by bph December 4, 2022
Thank you to @zzap for suggesting this topic.

Can you think of an outline for a blog post? What specifically should be covered?

@bph bph added flow: needs writer the idea/pitch needs a writer flow: approved can move forward Backend PHP labels Jun 2, 2023
@bph bph changed the title Optimising your WP_Query queries for better performance Jun 2, 2023
@OlaIola
Copy link

OlaIola commented Nov 3, 2023

I am woring on this. Planned date for the draft—November 20th.

@bph
Copy link
Collaborator Author

bph commented Dec 14, 2023

@OlaIola Just checking in if there are any blockers on your progress I could help remove?

@bph bph assigned bph and OlaIola and unassigned bph Jan 4, 2024
@bph bph removed the flow: needs writer the idea/pitch needs a writer label Jan 4, 2024
@zzap
Copy link
Member

zzap commented May 31, 2024

@OlaIola, thank you so much for working on this topic. It is an extremely important one, as I see many bad practices resulting from not understanding what happens when a query is processed.

I reviewed the draft. At first, I started leaving comments directly in the document, but then I noticed the same issues being repeated, so I'll give general feedback here.

The draft does not feel ready for review. The examples and descriptions of problems are unclear. I don't understand the situations you are explaining, and then I'm not sure if the code example shows good or bad practice. I would suggest revising each problem and trying to answer the following questions:

  • Why is a custom query needed in this situation?
  • What is the common pitfall/mistake in this query?
  • What is the consequence (performance-wise) of this mistake?
  • What is a better, more performant solution, and why?

You're listing quite a few situations/problems. I'd rather choose 3-5 of the most performance-impactful ones and go into detail with them than have 21 unclear ones. It is OK to state that the article will not cover all situations in detail and just list the rest as the ones to pay attention to and thoroughly test when using.

Please let me know if you want to discuss this further. Thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants