Any reason not use PostgreSQL's built-in full text search on Heroku?

后端 未结 6 1220
死守一世寂寞
死守一世寂寞 2021-01-30 01:44

I\'m preparing to deploy a Rails app on Heroku that requires full text search. Up to now I\'ve been running it on a VPS using MySQL with Sphinx.

However, if I want to us

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 02:10

    I found this amazing comparison and want to share it:

    Full Text Search In PostgreSQL

    Time to Build Index LIKE predicate -- none
    PostgreSQL / GIN -- 40 min
    Sphinx Search -- 6 min
    Apache Lucene -- 9 min
    Inverted index -- high

    Index Storage LIKE predicate -- none
    PostgreSQL / GIN -- 532 MB
    Sphinx Search -- 533 MB
    Apache Lucene -- 1071 MB
    Inverted index -- 101 MB

    Query Speed LIKE predicate -- 90+ seconds
    PostgreSQL / GIN -- 20 ms
    Sphinx Search -- 8 ms
    Apache Lucene -- 80 ms
    Inverted index -- 40 ms

提交回复
热议问题