title: Full-text search in Postgres or CouchDB?
body: <p>I took geonames.org and imported all their data of German cities with all districts.</p>
  <p>If I enter &quot;Hamburg&quot;, it lists &quot;Hamburg Center, Hamburg Airport&quot; and so on. The application is in a closed network with no access to the internet, so I can't access the geonames.org web services and have to import the data. :(
  The city with all of its districts works as an auto complete. So each key hit results in an XHR request and so on.</p>
  <p>Now my customer asked whether it is possible to have all data of the world in it. Finally, about 5.000.000 rows with 45.000.000 alternative names etc.</p>
  <p>Postgres needs about 3 seconds per query which makes the auto complete unusable.</p>
  <p>Now I thought of CouchDb, have already worked with it. My question:</p>
  <p>I would like to post &quot;Ham&quot; and I want CouchDB to get all documents starting with &quot;Ham&quot;. If I enter &quot;Hamburg&quot; I want it to return Hamburg and so forth.</p>
  <p>Is CouchDB the right database for it? Which other DBs can you recommend that respond with low latency (may be in-memory) and millions of datasets? The dataset doesn't change regularly, it's rather static!</p>