of the site are using capped collections • StrongHold Kingdoms (MMO): Logging of events from syslog / internal events are stored in a capped collection (Graylog2 & a custom dashboard system) • Lioness: cache + log of data, used to cut lag & reduce API access requests to Facebook • Findlunch.in: Caching of page data Friday, 20 April 12
to a point - great for location based services • Insert a document as normal, but with some co-ordinates... • ensureIndex({location_field: ‘2d’}); Friday, 20 April 12
or around $center point (circle)...which is handy • Results are sorted by distance from points • geoNear (command) will return distance, average distance, etc Friday, 20 April 12
is pretty old • >= 1.7.0 added spherical support (more in a minute) • < 1.7.2 doesn’t support geo in sharded collections. It still has issues see: http://jira.mongodb.org/browse/SERVER-926 Friday, 20 April 12
documents around a specific point • You can get distances from that point as well • Lookups are fast and accurate • This is a pain to do in MySQL Friday, 20 April 12
they are. • Geocode lookup of ~2 million postcodes from the UK • All London tube stations & most boroughs are also listed • Average query time Xms over 20k of test documents Friday, 20 April 12