Rob Church wrote:
On 21/08/06, Andrew Dunbar hippytrail@gmail.com wrote:
I've been thinking for some weeks or more now that a good feature to improve the usefulness of large categories would be "Random article in this category". I would be excellent for maintainence where nobody is going to iterate through the whole lot but does like to try to keep order etc.
Someone tell me why the bollocking hell I never implemented that? I'm pretty sure I set out to do so at least once in the past.
Because it would require a DB query with an execution time proportional to the number of articles in the category? Having categories with lots of members is fine, as long as we don't try to traverse them all the time.
The efficient way to do it would be to enumerate the category members, saving the results to a table for later lookup. The entries in this special table could have an expiry time. Is that how you were planning on doing it?
-- Tim Starling