Replying to:
nentwined 20-Jan-05/11:13 AM
That's... difficult, if you mean "by votes placed in the last month or three months". There's 10,000 poems, and it's a slow operation to actually calculate a poem's average; at least in "internet time". At least, I don't know of a better way than what I'm doing, and that takes about (runs "explain analyze") 7.5 seconds to get the "current average" of every poem. What I do to get around that is keep the running tally on the poem itself and update that when either the poem is edited or someone votes on it.

SELECT id, voteaverage(id) FROM poemranker_poems: 7483.31 msec
SELECT id, avg FROM poemranker_poems: 190.28 msec

Captcha required for non-logged-in users




Track and Plan your submissions ; Read some Comics ; Get Paid for your Poetry
PoemRanker Copyright © 2001 - 2025 - kaolin fire - All Rights Reserved
All poems Copyright © their respective authors
An internet tradition since June 9, 2001