L
L
Lexxtor2017-01-19 01:37:31
MySQL
Lexxtor, 2017-01-19 01:37:31

Is it worth switching to Postgresql?

  1. I have been using MySql for more than 7 years, do I need Postgresql for professional growth or will they take it everywhere?
  2. There is a personal educational project on MySql, I began to transfer it to Postgresql, the dump was converted, but the requests are falling: like was replaced by ilike, now the index does not work and there is still a lot of incomprehensible left.
    And I began to switch because I need a search by geo coordinates, MySql still doesn’t seem to have a normal one.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
K
ky0, 2017-01-19
@ky0

Well, if in seven years the muscle has not grown tired of its crookedness, now the benefits of the transition are becoming less and less every year, since during this period he got rid of most of his shortcomings. On the other hand, knowing and being able to use two DBMS is always better than one.

U
un1t, 2017-01-19
@un1t

> I have been using MySql for more than 7 years, do I need Postgresql for professional growth or will they take it everywhere?
Of course they will, MySQL is in demand. If that's all you care about then there's no point in moving on.
I've been using MySQL for a long time and haven't seen any special features in postgres.
Then I noticed that some operations (LOAD DATA) on mysql are somehow not decently long.
I spent a couple of days optimizing MySQL configs, but somehow it was still long. I tried postgres, spent a couple of hours on configs, despite the fact that I knew him very poorly. And the operation was completed 10 times faster.
Then, I tried to run tests on postgres. On Mysql, they were executed, just for a very long time. And on a postgres is easy to set up, so that the result becomes comparable with sqlite :memory:. In general, loading data and quickly executing tests was what made me switch to postgres.
Of the goodies, I use functional indexes, arrays, and I plan to use full-text search in some places. Although postgres did not justify my hope that with the transition it would be possible to cut out elasticsearch.
From what I really miss, this is group by. In postgres, of course, there is a group by, but there are restrictions that you can select fields and sort only those fields that are used in group by.

O
OnYourLips, 2017-01-19
@OnYourLips

Now the difference has almost disappeared: queries are written through ORM, they do not work directly with DML. The logic in the database also ceased to be kept with the spread of architecture on microservices.
There are very few exceptions, usually very complex reports, or the use of NoSQL features.

P
Puma Thailand, 2017-01-19
@opium

если писать на yii то без разницы
а так да с гео намного веселее все в постгресе

V
Vitaliy Orlov, 2017-01-19
@orlov0562

1) Конечно стоит. Нужен.
2) Скачай любой учебник по постгресу и потрать день на чтение матчасти, чтобы не сидеть над "детскими" проблемами. А конкретные ошибки можешь просто гуглить, 99% проблем уже описаны.

F
freeExec, 2017-01-19
@freeExec

Ну вообще MySQL тоже умеет быть геобазой - dev.mysql.com/doc/refman/5.7/en/spatial-extensions.html, я правда не работал, но простейший поиск с геоиндексами вряд ли глючит.

B
beduin01, 2017-01-19
@beduin01

Не стоит. Я долгое время пользовался PostgreSQL, но сейчас по большей части на MySQL (MariaDB) перешел т.к. все более чем устраивает.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question