[Tilesathome] Status 'new' vs. 'pending'?

Christopher Schmidt crschmidt at metacarta.com
Thu Nov 15 04:41:27 GMT 2007


Earlier today, the tiles_queue database grew a bit too big for its
britches, and as a result, it started resorting to a filesort for
finding the next tile to request. (ouch.) As a result, I changed the
code, but I'm realizing now that I changed it incorrectly, and it iwll
need to go back to the way it was.

Specifically, the problem I'm having is that the test of finding 'high
priority tiles' where status <= 1 is expensive (but finding all the
tiles in status = 1 is easy and status = 0 is easy). 

Can someone explain to me what the difference between 'pending' and
'new' is supposed to be? It seems like rendering from 'new' will let
clients sit without being rendered for a time, but always rendering from
pending will cause requests which don't get picked up in the first hour
to get missed as more come in behind them.

Why are these queues seperate? What does this help? And how should we
accomodate for the fact that this really is not cutting it for
performance? (Should we drop the low priority request count to get the
table back to being tiny and fast again? Is there a way to index a
column such that 'status <= 1' actually hits a key?) 

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the Tilesathome mailing list