in reply to On Site retitle function

This has been implemented on the test server (minus automated choice of title), but I have not moved the code over because I was worried that it may place too great a load on the database.

The code traverses the thread and for each node that needs re-titling, executes an Update (to change the title) and an Insert (to update the node history).

Take for example 'Algorithm wanted' (481987) which at the moment has 83 replies; clicking the retitle button would execute 84 Updates and 84 Inserts. Even if the re-titling could be done using a single Update (I think we would need subqueries to do that), there's no escaping the Inserts if we want edit histories.

For any interested pmdevs, the re-titler is node 324584 on the test server.

Replies are listed 'Best First'.
Re^2: On Site retitle function
by Corion (Patriarch) on Aug 12, 2005 at 20:35 UTC

    The existing retitling scripts put a far higher load on the site because they request each node to be retitled via HTTP, and save it again, not only causing your UPDATE statements but also updating the user settings and other stuff. So in my opinion, the load is negligible. Mad props for implementing this!

      But the retitling scripts can go to sleep between node updates, I'm not sure the onsite retitler has that option.

        Rendering the nodelets takes a few thousands SQL queries. Rendering a page with no nodelets only several hundred SQL queries. Adding a hundred SQL queries / updates to a single page load likely isn't a big problem (given how infrequently retitling happens).

        - tye