[OSM-dev] Too many slow queries in db

Dave Hansen dave at sr71.net
Tue Sep 4 21:44:20 BST 2007


On Tue, 2007-09-04 at 19:30 +0100, Jon Burgess wrote:
> 
> 
> Counting the nodes with:
> 
> $ gzip -dc */*.gz | grep -c "<node "
> 95326826
> 
> Then repeat with segment and way, I get:
> 
> Node: 95M
> Segment: 99M
> Way: 8M
> 
> Total = 202M objects.

Let's play spot the bug. :)

                foreach my $key (keys %$county_stat_hash) {
                        $state_stat_hash->{$key} += $county_stat_hash->{$key};
                        if ($is_completed) { 
                                $state_stat_hash->{"$key-completed"} += $county_stat_hash->{$key};
                        }
                        $state_stat_hash->{$key} += $county_stat_hash->{$key};
		}

I was double-counting a bunch of the data that kept track of complete
counties.  

Now:

http://dev.openstreetmap.org/~daveh/tiger/stats.html
> There are 379139496 OSM objects in the entire US TIGER upload
> We are processing 20.193981 OSM objects per second
> at this rate of upload, the entire US will be done in: 18774876 seconds or 217 days or 0.594940 years
> on Wed Apr  9 04:54:39 2008

-- Dave





More information about the dev mailing list