TSP Posted November 22, 2019 Share Posted November 22, 2019 In background tasks and upgrade tasks you generally seem to like updating the database even though the values you'd like to update is the same. I can understand that this might make sense to do in some circumstances, but in cases where it's not much extra work to check if it's the same values, it could speed up the execution of background tasks and upgrade processes quite a bit. As an example of a background task that I saw benefit from this is: applications/forums/extensions/core/Queue/TopicStarterIds.php In the majority of cases the initial value will be correct, so it doesn't make sense to spend time updating every row. As an added note: this task also suffers from the fact it uses offsets in the select, instead of requesting topic ids larger than X. I saw a decrease in query time from roughly 1.5 to 0.5 seconds for the high Ids when I rewrote the select-query for this task. When you have 1.6 million rows, this adds up. Link to comment Share on other sites More sharing options...
bfarber Posted November 22, 2019 Share Posted November 22, 2019 I have logged an internal bug report to have this checked on. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.