[OSM-dev] scaling

Tom Hughes tom at compton.nu
Tue Jan 11 13:04:18 GMT 2011


On 11/01/11 12:04, Steve Singer wrote:
> On Tue, 11 Jan 2011, Tom Hughes wrote:
> 
>> Obviously that can be rewritten by replacing each use of a temporary
>> table with a subquery but as the temporary tables are used multiple
>> times that leads to multiple evaluations of those queries.
>>
>> Hence Matt was saying that the real alternative would be to replace the
>> temporary tables with storing the lists of objects in memory on the
>> cgimap client. That has both a memory overhead and a cost overhead in
>> sending long lists of objects back to postgres in subsequent queries.
> 
> Another option might be to have a second postgresql instance and select
> the lists of objects from the replica into this second database (that
> exists just to hold the temp tables).  You could use pl/proxy, DBI/link
> or the SQL/MED stuff coming in 9.1 to have the second database talk
> directly to the first one.

Presumably having the two sets of tables in different databases will
destroy it's ability to optimise any queries which join between them though?

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the dev mailing list