[OSM-dev] API very slow this morning

Styno styno at hotmail.com
Thu Mar 22 12:27:04 GMT 2007


If the slowness of the API is caused by the lack of row level locking in 
MyISAM, then it IMHO has no (great) use in trying to optimize the SQL 
code or other components then the database.

When using a suitable database engine like MySQL InnoDB or PostgreSQL (I 
think the latter one is preferred), the API will become so much more 
responsive that - at least for the time being - tweaking of API code 
won't add much to the experience that users will have. You can therefore 
save yourself a lot of effort.

Summary: Please do not try to optimize code to work around a problem 
embedded in the chosen database. Fix the database instead.

Richard Fairhurst wrote:
> SteveC wrote:
> 
>> I'll bet money it's the bad /traces/ SQL code. Sit on db and mytop -s 1
>> and you'll see all the tables locked due to that code. This is fixed in
>> rails and also why we should move to something that doesn't lock tables
>> i.e. postgres.
> 
> I'm up for a UK hacking day at some point, so that the rest of us can  
> give a bit of extra manpower to help Steve with stuff like the Rails  
> port, search API, integrating Potlatch, etc. etc. Anyone else?
> 
> (Can't make Essen, unfortunately. I know all of this could  
> theoretically be done remotely but I'd rather do any serious hacking  
> with others in the room... lest I break something.)
> 
> cheers
> Richard
> 
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
> 
> 




More information about the dev mailing list