MySQL 5.7.6 is out
datacharmer.blogspot.com
datacharmer.blogspot.com
A better overview link for what's new in 5.7.6 specifically is this one: http://mysqlserverteam.com/the-mysql-5-7-6-milestone-release...
To understand what's new in 5.7 overall: http://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html
Specific to this blog post. Here is the page on upgrading: http://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previo...
I'm happy to answer any questions, please feel free to ask away.
How could Oracle have possibly "accidentally completely removed" the old syntax for setting a password even though it "was meant to be only deprecated", without being completely incompetent?
I can not in my wildest imagination come up with a scenario in which a competent developer could possibly "accidentally remove" something like that. If they made such a huge "accident" with that security feature, what other terrible negligent "accidents" lurk just beneath the surface of this new release of MySQL?
How can you "LOL" away such an incompetent "accident" like that?
To describe our process: We have at least 2 code reviews, ~90% test coverage before we release a feature in a development milestone. It was then caught by at least 3 people that I know of prior to public release. Since this is not a GA release, it was decided to fix the bug in the next version.
I always found this title a bit weird. How does one exactly manage a community? :-)
I agree it's a silly name, but it's not like we created it :)
To build a strong community, stop “community managing”, be a Tummler instead.
http://dangerouslyawesome.com/2014/04/community-management-t...
1. It's reliable/durable
2. I know the tools (mysql command line is friendly to me)
3. It's performance is predictable. 99% of issues with performance are easily solved with the right index
4. I don't find myself needing many SQL features beyond the basics.
Also, I'm a happy user of other tools to compliant mysql. Including redis and elasticsearch. Both of these tools IMO compliant MySQL.I'm no fan of Oracle by any means but at least MySQL is still an open source database. Perhaps when I have free time before the next startup I'll give Postgres a good look. For now I'll probably try it out with AWS redshift...
I would personally contest that. I've seen MySQL corrupt tables before and the insanely unhelpful defaults which make MySQL accept and alter invalid data really don't strike me as neither reliable nor durable.
Your other points are valid reasons for sticking with MySQL though. If you're happy and the tool does what you need, that's fine.
But once you've seen what you can do as you gain access to the more advanced SQL features and once you've burned by MySQL not starting up because of data corruption, then you might want to investigate other options.
Postgres happens to be a very good alternative with good tools, predictable performance, very advanced SQL features, but also really good reliability and durability.
What "advanced SQL features" do other DB products have that you cannot do with MySQL?
Regarding corruption, it's an anecdote, but my girlfriend has lost a ton of data for her thesis related to innodb corruption. It took me hours of bit-twiddling to get the data back (and into Postgres where it's safe and accessible since then - on the same hardware, so don't blame this to broken hardware)
Now I can totally accept that this might have been a one-time fluke, but I personally really have trouble trusting a DBMS once it has lost data due to causes other than user-error or hardware faults.
Regarding corruption, it's an anecdote, but my girlfriend has lost a ton of data for her thesis related to innodb corruption. It took me hours of bit-twiddling to get the data back (and into Postgres where it's safe and accessible since then - on the same hardware, so don't blame this to broken hardware)
It's not safe until it's backed up. I don't care if it's a $100k oracle installation, It's not safe until it's backed up. Even then it's suspect...
1: http://stackoverflow.com/questions/17147920/postgres-window-...
https://fosdem.org/2015/schedule/event/youd_better_have_test...
Coming from a MySQL background I didn't understand the fuss over CTEs ...until I worked with a SQL Server guy. That completely opened my eyes to how _sane_ things could be, vs my MySQL work-arounds.
Made me wish I'd chosen a Microsoft route!
Good news is that Postgres has great CTE support and it was ahead of MSSQL in window functions last I checked!
Comparatively, for MySQL, my recommendation would be 'High Performance MySQL'.
So long as it possible to redefine the mode at will on a per connection basis or on startup then the integrity of data held within MySQL cannot be guaranteed.
Integrity can also not be upheld if applications lie. i.e. I always enter the same incorrect birthday if an application asks me for this, but I don't think they have a reason for it.
This will break some applications that are upgrading. I have a whitelist/blacklist suggestion on how to transition on my blog: http://www.tocker.ca/2014/09/01/suggestions-for-transitionin...
> 3. It's performance is predictable. 99% of issues
> with performance are easily solved with the right index
This is one of my least favorite things about MySQL. The "explain" feature is much less informative than that offered by MSSQL or Postgres, so figuring out what indexes or tuning to apply is harder than it needs to be.And then when you do have everything indexed correctly, MySQL is significantly dumber (edit: looks like I'm significantly dumber! see correction below) about using those indexes than MSSQL or Postgres.
For example: those two can do index-only SELECTS. If table "foo" has columns A, B, C, D, E, and F and I've created an index on A and B, why can't "select A,B from foo" be served directly from the index? Postgres and MSSQL do it, and it's a huge performance boost in those two.
Postgres also lets you do some amazing things with partial indexes, indexes on computed values, etc.
MySQL might not be horrible here, but out of the 3 major relational databases I've used, it's clearly the weakest at this so it's funny to hear it touted as a strength.
Edit: Good news - I was wrong; MySQL does support index-only selects (covering indexes). User morgo also pointed out the improved JSON format for explain as well.
I believe your example might be http://mysql-nordic.blogspot.ca/2015/01/with-latest-verions-... - Fixed in 5.7.5.
There has been a lot of work in improving the optimizer recently. One project that I find particularly interesting, is the focus on improving the cost model: http://mysqlserverteam.com/the-mysql-optimizer-cost-model-pr...
mysql supports that with covering indexes.
https://books.google.co.uk/books?id=IagfgRiKWd4C&lpg=PA178&v...
1) Peak throughput is not as important as consistent throughput (i.e. less variance between response times). This makes it a great fit for front-facing web apps, and we have Percona/Facebook/Google in particular to thank for their contributions in improving this.
2) Often users do not get the performance they are entitled to, because they lack the visibility. MySQL 5.6 and above (and particularly mysql 5.7) have performance_schema to be able to track down and diagnose issues. Memory/transactions/stages/replication/prepared statements/statements/mutexes.. these things are all instrumented by Performance schema. Just today I saw a new query written to show a breakdown of latency per schema/per statement type: http://dba.stackexchange.com/questions/94723/getting-databas...
That's probably why you still like it. As it stands, MySQL has so many shortcomings it's not even funny.
Version 5.7 is the first one to support multiple triggers per event. Beyond that, and just to name a few, you can't have subselects in views, you don't have CTEs (good luck storing hierarchical data in an adjacency list), no materialized views, CHECK constraints are parsed but ignored.
I'm glad it works for you, but the minute you need to do something slightly more complex, MySQL gets in your way.
I hope the situation will improve, though.
Granted, the real problem is a poor design of the system, but materialized views would enable me to improve what others have left behind.
It is my habit from old days to compile everything.
Even if you don't, give it a chance.
1. Indexes are too simplistic. You can't index the output of a function.
2. InnoDB lacks full text search. MyISAM has it, but MyISAM is bad since it doesn't support transactions.
3. Unicode support by default does not support all Unicode characters. That's right, even though it says UTF-8, not everything is supported, and you have to specifically enable support for some character subsets for your DB.
4. MySQL replication is... how should I put it? Delicate. There is no integrity checking, and since by default it's just replaying an SQL log you can easily get inconsistencies between the master and the slave. There are lots of ways to confuse replication, such as `INSERT INTO my_table (foo) VALUES (RAND())`. There are no built-in tools for integrity checking the slave, and the third party tools that exist have to resort to some really crazy things, like re-inserting tables. I could go on about replication, and its issues for a while, but I want to move on to the other points.
5. No transactional DDL. This really sucks when using with something like Django migrations.
6. No point in time backups. You either use mysqldump with a transaction (you aren't using MyISAM, right?), or you stop the database server.
7. Logs suck. No, really, have you tried debugging an issue with your queries, deadlocks, configuration errors, etc.? MySQL's server logs (not query logs), are not very verbose, and what the do write is mostly useless.
8. Row level locking semantics are at times doing unexpected things. Last time I used MySQL for complex real time write-heavy stuff, I actually moved to advisory locks instead (the support for which is not exactly great in MySQL and could be expanded). This invites contention, deadlocks, and other nastiness where it isn't necessary.
9. No IPv6 support.
10. Can't index Archive engine tables.
11. Can't partition tables by any arbitrary value. It has to be only specific types which makes it too restrictive.
12. GIS support is not really there. Lots of basic features aren't supported.
13. No materialized views. You can simulate it with triggers, but that's not nearly as convenient.
14. No async drivers.
Note that these are very specific features. If you don't use them, good for you. No reason to switch away from MySQL just because. It has some advantages over Postgres as well:
1. Simple user management.
2. Simple database management. No schemas, objects, etc., just tables and views here.
3. INSERT IGNORE and REPLACE! You don't need to create triggers for these.
4. Decent performance out of the box, and lots of knobs to turn when tuning.
5. Generally, doesn't require a ton of setup time. Install it, create user and DB and code away (Postgres and lots of others have this too, but it is a good feature).
6. Large amount of community brain share, so you won't be braving a new world here.
So, basically, go ahead and use it if it works, but I'd say Postgres deserves a try too and your 4 points apply to it equally as well.
2. InnoDB has fulltext from MySQL 5.6+
3. I agree utf8mb4 should be renamed "utf8". When this was introduced it was given a new name to support downgrades, but the feature does exist :)
4. RAND() is actually deterministic (via other meta data written to the binlog). In any case, MySQL also supports Row-based replication and it is the proposed default for 5.7.
5. I would like to have this feature too :) It is important to note that few databases have this though.
6. MyISAM is no longer the default. PITR works fine with InnoDB.
7. The logging verbosity can be changed. In MySQL 5.7 there is a new server logging API which makes sure the output format is consistent. For some of the meta data you are suggesting, the better place to retrieve this is performance_schema.
8. You are probably talking about gap locks etc. These are required for statement-based replication, with Row-based they are not required.
10. I would suggest that ARCHIVE engine is of limited use-cases.
11. Please see http://mysqlserverteam.com/the-mysql-5-7-6-milestone-release... (search "innodb native partitioning"). Allowing more arbitrary functions would most likely require global secondary indexes. 5.7.6 contains an important change to move in that direction.
12. GIS support is improved dramatically in 5.7, including InnoDB support. Please take another look :)
14. I agree on this one. Async drives is becoming very important :)
RE: Point #4 in your second list, MySQL 5.6 contains much better configuration out of the box: http://www.tocker.ca/2013/09/10/improving-mysqls-default-con...
I didn't know about a lot of these improvements, and am happy that they are happening. I moved away from MySQL around 2012-2013 because of the above reasons, so glad that things are improving.
(The table 14.5 column "Allows Concurrent DML?" is the interesting one.)
Postgres has proper support for ENUM as defined in the SQL Standard. You have to create a new type and declare it as being an ENUM type:
http://www.postgresql.org/docs/9.4/static/datatype-enum.html
- If something goes wrong at 3am, I know how to fix it.
Whether it's performance, server setup, or weird edge cases, I have it covered.
This being the sole reason, does anyone have any "when you're in trouble" guides for Postgres or others?
How active is the MariaDB development compared to MySQL's?
Should we still be concerned with Oracle trying to kill MySQL? How has that whole debacle played out?
- Oracle sees MySQL users as a distinct group of customers from the Oracle Database
- 5 years on, the engineering team on MySQL is 2x what it was when acquired.
By a simple metric (LoC), MySQL 5.6 has a larger delta than any previous release: https://www.flamingspork.com/blog/2013/03/05/mysql-code-size...
Edit: See also this interview with Percona's CEO - http://www.zdnet.com/article/mysql-why-the-open-source-datab...
https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-features/
If marketing is to be believed, it does seem like MariaDB offers many points of attraction over MySQL. The fact that Oracle does not provide test cases or has proprietary extensions is a bit alarming from a software freedom perspective.
Technically its true that the install process is a little different but not much, and theres some minor changes in user configuration. I've looked into it and the most exciting "DBA level" changes are YEAR(2) is finally utterly expunged, and there's some new reserved words "NONBLOCKING" and "OPTIMIZERCOSTS". Thats about as exciting as it gets.
Its not transparent upgrade but its not like they're changing the default db engine to an embedded nosql engine, or changing the default char encoding to EBCDIC.
This means that a number of statements that produced warnings (but proceeded) will now produce errors.
I have some slides on it here: http://www.slideshare.net/morgo/upcoming-changes-in-mysql-57 (see slide 33 onwards).
Definitely good news, as MySQL came out during the peak of Moore's-law (or, more appropriately, a misapplication of) fueled idiocy where nobody seemed interested in investing in better performing software, since they all expected they'd have faster hardware next year. Now everybody's deploying to VPSes, so it's once again important that we get the most out of every single CPU cycle. I haven't gone through all the diffs, but if they're promising 2x to 3x improved performance, there must have been some pretty fundamental rewrites of old code.
Coming from the Oracle + DB2 world, what I'd really like to see is some improved performance analysis and query optimization tools. There have been some incremental improvements to EXPLAIN (the new 'EXPLAIN on a named connection' feature seems pretty cool for when I have 10+ application instances all connecting to my DB), but it's still got a long way to go.
Visibility is the most useful and always under-rated feature. If I can clarify some of the recent enhancements here:
- MySQL 5.6 introduced `EXPLAIN FORMAT=JSON`. MySQL Workbench uses this to visualize query plans (important as they get complicated.)
- Also in 5.6 was optimizer trace (find out why indexes were not used etc.) and performance_schema enabled by default.
- MySQL 5.7 adds cost information to `EXPLAIN FORMAT=JSON` (Workbench also understands it.)
- Workbench also has a set of performance views based on Performance_schema (based on a project called SYS). You can install it as standalone from here too: https://github.com/MarkLeith/mysql-sys
- The runtime performance data from SYS is very useful for making correct optimization decisions. Being an SQL interface is also friendly for writing your own scripts against it.
Also, to clarify on your first paragraph:
Yes, refactoring old code was one of the ways this was achieved. We picked refactoring targets based on performance and because some of the older code is not very testable.
We do not have a release date, but we're committed to a 2-3 year release cycle, with 5.6 being the last release in Feb 2013.