[OSM-dev] Proposed database improvement

Nick Hill nick at nickhill.co.uk
Thu Aug 31 17:46:39 BST 2006


The only change I can determine with the output from the SQL code is 
that the segments will be returned from the query out of sequence, 
whereas before, they were returned sequenced on segment id.

Current:

res = call_sql {"SELECT DISTINCTROW * FROM ( SELECT id, node_a,
node_b, tags FROM current_segments where node_a IN #{cbuff}
and visible = true UNION SELECT id, node_a, node_b, tags FROM 
current_segments where node_b IN #{cbuff} and visible = true) as a 
#{timeclause}"}

This can be corrected to give bit-identical output to the previous query 
  by:

res = call_sql {"SELECT DISTINCTROW * FROM ( SELECT id, node_a, node_b, 
tags FROM current_segments where node_a IN #{cbuff} and visible = true 
UNION SELECT id, node_a, node_b, tags FROM current_segments where node_b 
IN #{cbuff} and visible = true) as a ORDER BY id ASC #{timeclause}"}





SteveC wrote:
> it might be the small change I made to the renderer as it was crashing,
> see last changset... nick? (W)?
> 
> * @ 31/08/06 04:25:41 PM Andy_J_Robinson at blueyonder.co.uk wrote:
>>> -----Original Message-----
>>> From: Nick Hill [mailto:nick at nickhill.co.uk]
>>> Sent: 31 August 2006 4:18 PM
>>> To: Andy Robinson
>>> Cc: dev at openstreetmap.org
>>> Subject: Re: [OSM-dev] Proposed database improvement
>>>
>>>
>>> Andy Robinson wrote:
>>>> Nice work Nick :-)
>>> Thanks.
>>>
>>>> I noted that the renderer still had trouble drawing the map data on the
>>>> tiles for the centre of Sutton Coldfield. But after the rest of the map
>>> had
>>>> drawn I went back and reloaded the couple of affected tiles and they
>>>> refreshed properly so it certainly appears that performance (in terms of
>>>> time of delivery and the actual data provided) is more reliable but still
>>> a
>>>> bit flaky. Which presumably means that these are not load issues.
>>> I think you are seeing a non-graceful failure mode in the case of
>>> overload for the tile server. I would be most concerned to find the data
>>> actually being delivered to tile were corrupt. I haven't seen any
>>> compelling evidence of data being served erroneous WRT the OSM data set.
>> No, I haven't seen anything served erroneous WRT the OSM data set either.
>> The issues that remain seem to focus down on timeout or connectivity issues
>> resulting  in something being left out rather than something messing up the
>> data that is sent out.
>>
>> Cheers
>>
>> Andy
>>
>> Andy Robinson
>> Andy_J_Robinson at blueyonder.co.uk
>>
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
> 
> have fun,
> 
> SteveC steve at asklater.com http://www.asklater.com/steve/
> 




More information about the dev mailing list