PostGIS vs. mySQL

Brent Wood pcreso at PCRESO.COM
Thu Oct 20 11:37:04 EDT 2005


--- Martin Poggensee <info at POGGENSEE.NET> wrote:

> I tried to use MapServer with a PostGIS database. The performance was not
> sufficient. After this I tried mySQL and this was much better. What are the
> advantages and disadvantages of these database-systems ???
> 

The postgis lists have plenty of info on this topic. They focus on
Postgres/MySQL, without delving into the spatial capabilities however.

Also see:
http://sql-info.de/postgresql/postgres-gotchas.html
http://sql-info.de/mysql/gotchas.html

One key factor is that the default install of Postgres is set up to run on
minimal hardware, and needs the config file tweaked to make use of decent
amounts of memory to perform well. MySQL's default settings tend to suit
gruntier hardware, so it is often faster "out of the box".

On the spatial side, having spatial functionality as part of the core DB is
tidier than a 3rd party plugin like PostGIS, but the Mysql spatial
functionality is still being developed, and is currently well behind PostGIS
(IMHO).

AFAIK, the MySQL query functions only check MBR relationships, which is very
quick, but frequently return wrong answers, so are not really much use yet.

I suggest you check to see if two separated but neigbouring polygons with
overlapping MBR's are considered disjoint or overlapping in MySQL, and also
consider whether or not you set up Postgres to use decent amounts of memory
after you installed it.


Brent Wood



More information about the mapserver-users mailing list