I have around 500 event posts on my site, however, only around 100 of these are in the future, meaning the rest are simply online for archival purposes and are filtered out of all views and archives via a custom field value. My question is, will deleting those 400 old posts from my site make a significant improvement on the load time of my views and archive pages that show events?
Hello and thank you for contacting the Toolset support.
If your views are configured to display all the 500 events, deleting the old 400 will definitely make an improvement on the views/pages of your website. But if you are, for example, using pagination in your views, keeping them won't be a problem from a performance perspective.
I hope this replies to your request. Let me know if you have any questions.
Okay, just to clarify, there are 500 events, 400 of those are filtered out by the Toolset WordPress Archive filters, and the remaining 100 are displayed in paginated pages, 20 per page.
I understand that pagination solves a part of the problem, what I'd like to confirm is that the initial query, that searches 500 events for the 100 to display, will not be sped up significantly if there are less than 500 to query through.
Thanks,
James.
Hello James and my apologies for the late reply, I do not work on Sundays and Mondays.
From a database perspective, the difference between querying a 100 or 500 posts might be considered insignificant. Of course, if the query is optimized. But if it is a query that is very complex it may take more time.
I can tell that Toolset queries are optimized, but depending on your setup, it may have something that makes it slow.
Generally speaking, the time needed to get a page is divided into several types/categories:
- Network time(for the request).
- Processing time in the server(Database time, and PHP processing time).
- Network time(for the response).
- Drawing time in the browser.
Toolset is involved in the "Processing time". If for example, you have a view that queries the 500 posts for some criteria and is paginated by 20, and that is also not using any other database requests inside the loop(eg. database query for a condition, or database query to calculate children in a Toolset relationship, etc.), I can tell that 500post or 100posts will not create any considerable/noticeable difference.
I hope this answers your question. Let me know if you have any doubts.
Thanks Jamal, that's helped with my understanding of the process.