Facebook uses various techniques to analyze and query social graphs. These include discovering cohesive subgraphs through approaches like finding large, dense subgraphs and top-k dense subgraphs. Memcache is used as a distributed memory caching system to speed up dynamic databases. Typeahead allows searching as a user types through prefix matching. Unicorn is Facebook's system for searching the social graph through an inverted index that represents it as adjacency lists. Systems like Hive, Scuba and Dremel are used to analyze data at large scales.