Very nice comparision of SQL Server, MySQL and PostgreSQL servers.MySQL DBA & Programming Blog by Mark Schoonover
As promised, after individual presentations at
last week's CommunityOne I brought together the community
leaders of three of the top GNU/Linux distros (Zonker
Brockmeier, OpenSUSE; Jono Bacon, Ubuntu; Karsten Wade, Fedora), threw in Glynn Foster of
OpenSolaris and moderated a no-holds-barred panel. (It took
them three hours to clean up the blood afterwards!!)
Although the panel itself wasn't recorded, immediately after it concluded, the five of us headed to the make-shift podcast studio we had set up at the event …
[Read more]MySQL has a handy feature, that allows you to turn an INSERT into an UPDATE if a unique or primary key duplication is detected:
http://dev.mysql.com/doc/refman/5.1/en/insert-on-duplicate.html
A common usage pattern for this is “lazy initialization“ of a row in a database, which is exactly what my team was using it for yesterday to solve a problem in the backend for version 2.0 of the MySQL Enterprise Monitor. However, we ran into an issue where Hibernate would throw an exception complaining that when the INSERT was turned into an UPDATE, it couldn‘t retrieve the generated primary key value (we are using auto increments on this particular table, as it‘s not a high insertion-rate table).
To understand why this happens, you have to know a little bit about how Statement.getGeneratedKeys() works with MySQL‘s JDBC driver. …
[Read more]In the Columbus, Ohio, airport right now waiting to board my plane to Salt Lake City. Tonight, I will be speaking on Join-Fu at the PLUG (Provo Linux User Group). Ryan Simpkins asked that I speak "at a very advanced level" and so that's what I will be doing! We'll see how the PLUG members handle my new set of slides on Intermediate Join-Fu that I have been working on...
I will post the slides a little later today after the PLUG meeting. I'm really looking forward to meeting Ryan and the other folks from PLUG and getting a short tour of Omniture, a large web analytics company that uses MySQL (no, it's not Overture. Totally different. One of those is now extinct.)
“Don’t worry about people stealing an idea. If it’s
original, you will have to ram it down their throats.”
— Howard Aiken
MySQL is back on Open Source track and that is definitely the best news for all (including community, MySQL and Sun as well). I think that now Sun/MySQL have agreed to the importance of community, it becomes community's responsibility to give them more reasons to believe so. Let's participate like never before.
Kaj, in his post says "...model to be useful for both those who spend money to save time, and those who spend time to save money". This is what Open Source is, isn't it?
All in all, a decision most awaited and …
[Read more]This is just a very short note about the recent license change from LGPL to GPL made by the author of extJS. When choosing an open source product make sure that the contributors are fragmented across enough organizations to prevent any chance of being able to do a license change. If that is not the case make sure that the community is large enough so that you have a good chance at succeeding with a fork if the need arises. In the case of extJS the later seems to be the case. As such the license change itself is not soooo big an issue, since a lot of people do not consider their frontend code to be proprietary anyways. The source is there for all to see. So for the most part people are fine considering their frontend to be licensed under the GPL. That being said, extJS guys are …
[Read more]I spotted an interesting blog post over on Planet OSDB about prepared statements gotchas. It illustrates very well the issue that prepared statements have been plagued with since their inception: namely that they can severely hurt performance (even though they are considered to improve performance by most people).
Just briefly: Why do we even care for prepared statements? For stateless web applications the benefits are mainly protection against SQL injection and better readability. In some rare cases in theory also better performance if the same statement is executed multiple times in the same request. The disadvantage is that for most web applications queries are rarely executed more than once and therefore the separation of parsing/planning and execution just means that there is an …
[Read more]Looking at Kaj's Blog Annoucement MySQL has pulled back on the plans to release portions of the servers as close Source only.
I am extremely happy to hear these news ! This is good for MySQL as a company, MySQL customers and MySQL users.
I'm hoping Community feedback was serious contributer to this decision, though I know there were a lot of Internal discussions as well. In any case this sends a great message to community - Speak up and you may be heard.
I also hope Marten Mickos took this decision being convinced rather than getting the order from the top as this is only one battle in "what is going to be opensource" war
Anyway thank you everyone who made this happen, in particularly Monty, which I know fought a lot for this.
…
[Read more]JavaOne wrapped up on Friday. We hosted individuals from across the globe, and from every industry: consumer electronics and gaming, to enterprise IT, space exploration, factory automation, the automotive industry, academia - like the network itself, Java delivers something for nearly everyone, everywhere.
This year's biggest announcements centered around Java's role in the future of rich internet applications (or RIA's). What's a rich internet application? It depends on your perspective - from mine, it's any network connected application that persists in front of a user, typically outside a browser, that can operate when disconnected from the network.
On the one hand, I'd claim Java's always been a RIA platform - before the world really wanted one. Early Java applets delivered interactivity, but at the expense of development complexity and, in the early days, performance - when a browser, and more recently Javascript, would …
[Read more]
I've come up with some interesting workarounds for missing
features using @session variables and I'd like to share one with
you today: DELETE ... JOIN ... LIMIT N;
okay, so we've got two tables, one with many duplicates and one
with no duplicates.
We want to join the tables using 'id', but only want to delete N
duplicates from t1.
MySQL's DELETE does not include LIMIT support when JOIN is used,
so we need to work around
that using some fancy footwork:
mysql> select * from t1;
+------+------+
| id | abc |
+------+------+
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
| 1 | 1 |
+------+------+
8 rows in set (0.00 sec)
mysql> select * from t2;
+----+------+
| id | xyz |
+----+------+
| 1 | 1 |
+----+------+
1 row …