0

Has anyone used mariaDB for storing spatial data? I am using postgis now. My queries are mostly "finding peope within certain radius". Happn app an app which shows you "the people you crossed path with in real life" seems to be using MariaDB in their stack.Should I move to MariaDB for perfomance?

  • In theory the most reliable test is to try both PostGIS and MariaDB with your own data, hardware, and queries. Unfortunately the test is useless if you do not know how to use the both databases in a right way. But your usage seems to be mostly ST_DWithin that is to large extent a direct search from spatial index followed by some filtering and it should not require any tuning. – user30184 May 15 at 12:24
2

MariaDB/MySQL have about 160 spatial operators:

https://mariadb.com/kb/en/mysqlmariadb-spatial-support-matrix/

Whereas PostGIS adds about 600 to PostgreSQL:

https://postgis.net/docs/PostGIS_Special_Functions_Index.html

PostgreSQL/PostGIS is extremely feature complete from a spatial perspective, so it allows you to do a lot. But PostgreSQL is also a very large enterprise level database engine.

MySQL/MariaDB are much more lean, more simple and lightweight.

As for performance, I imagine if the function can be done with both, the speed will be pretty comparable.

If you are already using MariaDB and just need a few spatial operators, no point switching over the PostgreSQL. But if you are doing full GIS operations in the database, PostgreSQL/PostGIS is the best choice.

| improve this answer | |
  • 1
    Question was about the opposite, moving from PostGIS into MariaDB. That is rather uncommon. If PostGIS (ST_DWithin) feels slow I would first study if something is done in a suboptimal way. In this case if the table is huge clustered index might help postgis.net/docs/performance_tips.html. – user30184 May 15 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.