[Tilesathome] Request priorities

Stefan Agner falstaff at deheime.ch
Tue Oct 30 15:14:20 GMT 2007


Matthias Julius schrieb:
> Stefan Agner <falstaff at deheime.ch> writes:
>
>   
>> On Mon, 29 Oct 2007 23:40:06 -0400, Matthias Julius <lists at julius-net.net>
>> wrote:
>>     
>>> 80n <80n80n at gmail.com> writes:
>>>       
>>> The attached patch for NeedRender/index.php should just do that (I
>>> hope, not tested).
>>>       
>> Why dont you use the ON DUPLICATE KEY UPDATE statements? That would reduce
>> mysql load... (I don't checked if its possible in this case, but as I read
>> the idea, my first idea was this statement...)
>>     
>
> There are more conditions for the update than a duplicate key. An
> update is only made if the request is pending and the new priority is
> higher (lower number) than the existing one. Can you capture that into
> one SQL statement?
>   
Hm ok, than it doesnt work that easy...

Put that stuff (with all descisions) into a procedure or a function... 
and just give the result back (ie OK, ALREADY IN QUEUE...). there would 
be less process changes, an it would be faster, but i don't know if its 
worth this effort... I just say this because there are performance 
problems on the server! I think your code is ok, but eventually we 
should check if we can reduce the mysql quries for an upload....

-- 
cya
falstaff





More information about the Tilesathome mailing list