4 ms·
I can't speak to Redis, because I don't use it, and mostly see it as being fairly distinct from Postgres, but with Mysql it's always frustrating to know that yo
by davidw 12y ago
I can't speak to Redis, because I don't use it, and mostly see it as being fairly distinct from Postgres, but with Mysql it's always frustrating to know that you could be using a tool that's generally better, but can't, because initially someone chose Mysql because they "heard it was fast" or "that's what the hosting company provided", and now they're stuck with it.
- raverbashing 12y agoYes, I agree with you, but comparing Redis to PGSQL is an Apples to Oranges comparison. Too bad 99% of Redis users use it as a glorified cache, because it's more than that.
- davidw 12y agoI've been friends with antirez a lot longer than Redis has been around, and have a lot of faith in his abilities as a programmer. It irritates me to see the snark directed at him on Twitter. But for most of what I do - smallish bootstrapped things - I want to build on Postgres, because I know I can take it a lot of different directions, as needs be. Unless I'm 100% sure that it's a bad fit for SQL and a great fit for Redis or something else, I'm going to consider Redis as a later optimization, not something to build on from the start. Like you write though, I mostly view Postgres and Redis as Apples and Oranges that could probably work together quite well in the right circumstances. Most of my ire is directed towards Mysql :-)
- antirez 12y agoMoreover, I can't remember a single time PostgreSQL folks have been unfair... PostgreSQL is definitely good both as a product and as developers culture.
- Beltiras 12y agoYou are not wedded to an SQL vendor. You actually can migrate your data, as long as your code is farily vendor-agnostic. I write Django apps and use the ORM for everything. That frees my customers from any sort of raw sql specific to one DB server.
- jimktrains2 12y agoIf everything you do is CRUD, sure. Often there are non-CRUD, more advanced queries that need to be run. These, and other issues, are normally what gets you. For instance, pgsql will error if you attempt to write 5 chars to a 2 chat field, mysql will silently truncate.
- Beltiras 12y agoWhich is why I never use MySQL ;) I'm trying for the life of me to think of queries I could make that are non-CRUD. Maybe I am just stuck in my current tools to think flexibly about it.
- davidw 12y agoHere's an one that I use with Postgres all the time for groupwise max kinds of things: DISTINCT ON - http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-DISTINCT http://www.postgresql.org/docs/9.0/static/sql-select.html#SQ...
- zaphar 12y agoI presided of over a Migration from DB2 to Oracle. All of the operations were CRUD. However the DB2 database had materialized views that were crucial to the business. Porting those over was non-trivial. Oracle returned a different value for null fields than DB2 (empty strings for null strings vs actual null in one case) did so various portions of the code would fail seemingly randomly. Some of the constraints didn't map quite as cleanly as the others. And we haven't even started on the performance tuning and how your schema affects them. Sure you may be able to port all or most of your schema and queries over to another database but you'll have a lot of work to do after that verifying that nothing is broken and your performance is still acceptable. SQL is not even close to a guarantee of portability.
- pit 12y agoWord. I'm working on a SQL Server -> DB2 migration, which I expect to finish sometime in the next decade.
- Rapzid 12y agoIt always annoys me to hear people talking about how slow MySQL is and have to deal with them going about modelling things poorly and sweating a few million row when they don't know how to design indexes properly and don't understand predicate order.. Or correlated sub-queries. That said, PostgreSQL is pretty fantastic software too.