Example:
select COUNT(1), status FROM some_table GROUP BY status ORDER BY status; -- Postgres 10x slower.
Also, mysql CLI is IMO much nicer than the postgres version. Better and faster autocompletes.Example:
select COUNT(1), status FROM some_table GROUP BY status ORDER BY status; -- Postgres 10x slower.
Also, mysql CLI is IMO much nicer than the postgres version. Better and faster autocompletes.I thought I was doing something wrong, so I asked on SO:
http://stackoverflow.com/questions/32755348/group-by-count-q...
This is a very simple example, but I always run into major performance issues with Postgres. Some of them are my fault, from not knowing that array aggregation is a slow operation.
MySQL advantages for me are that there is an actual UPSERT operation (an inferior version of which might be added to Postgres 9.5), that the CLI is miles ahead, and that it's much faster for a small number of tables with a lot of data and with non-complex operations.
I would add, you should really upgrade to 9.4, as there were some performance improvements to aggregates.
I am not sure in which cases the MySQL one doesn't work correctly. ON DUPLICATE KEY UPDATE checks every unique fields in table, not just PRIMARY key.
Also, I'll try these suggestions, but you can see that it can be frustrating that simple queries don't work quickly or randomly work really slowly and you have to find some configuration settings to hand tune.