Slashdot Mirror


MySQL 5 Production in November

thatoneguyfromphoeni writes "CIO.com is reporting that MySQL AB is eyeing Nov. for the production release of MySQL 5. 'The company is calling version 5 its most significant upgrade yet. It adds a handful of features considered important for enterprises that have long been available from market leaders Oracle Corp., IBM Corp. and Microsoft Corp. Chief among them are triggers, views and stored procedures.'"

56 of 286 comments (clear)

  1. MySQL has finally caught up by Michalson · · Score: 5, Insightful

    MySQL has finally caught up to the state of the enterprise relational database industry...as it was in 1999. Points for effort, but everyone else is still ahead with core features like integrity, leaving them free to build on new and better features. Bundling with PHP will only get you so far.

    1. Re:MySQL has finally caught up by tcopeland · · Score: 3, Informative

      Yup, and meanwhile PostgreSQL is prepping an 8.1 release with shared row locking, table partitioning, and better SMP support. Draft press release is here.

      Anecdotally, RubyForge got 240K hits yesterday on a GForge site backed by a PostgreSQL 8 database with no problems; good times. PostgreSQL is good enough that our problem is bandwidth, not server load.

    2. Re:MySQL has finally caught up by Osty · · Score: 2, Informative

      For the record proper transactions have been around for ages, and 5.0 has largely corrected the remaining integrity problems with triggers and the Server Mode variable (options to prevent the insertion of 'bad' data).

      Why oh why are not many of these new modes not on by default? For example:

      • STRICT_TRANS_TABLES: Why would you ever want to insert bad data? If you try to insert bad data, your insert should fail. (where "bad" is defined in several ways, such as "violates a foreign key, check, or unique constraint", or "does not match the data type, like trying to insert a bigint value into an int column.") As for rolling back transactions on such a failure, I'm indifferent. I could go either way, letting the DBMS roll back for me and immediately abort, or allow me to catch the error (have you seen SQL Server 2005's try/catch semantics? Sweet!) and rollback or continue as I choose.
      • ANSI_QUOTES: Double quotes (") do not define string literals in any SQL language. Don't use them as such. Use single quotes (') like you're supposed to. Double quotes are used when you need to reference a table or column that you unfortunately named the same as a reserved word, or even more unfortunately named with a space (e.g., I could have a table called "select" or "table with a space", and the only way to refer to either is by quoting). While other engines are as bad as MySQL in that they provide their own quoting characters (for example, SQL Server uses square brackets ([ and ])), they also generally allow ANSI quotes by default. So should MySQL.
      • ERROR_FOR_DIVISION_BY_ZERO: What? I have to enable this? If I divide by zero, something's wrong. Fail. Fail, dammit!
      • NO_AUTO_CREATE_USER: GRANT should never create users. GRANT grants permissions. It should not have a side effect. If you need a user created, create the user (through whatever database-specific method you must).
      • NO_ENGINE_SUBSTITUTION: This is another stupid mode. Why would you ever want MySQL to silently choose a different engine? If you mark your tables as InnoDB (don't even get me started about how that's not the default, and how it's stupid that you have to explicitly mark what tables you want to be transactional), chances are you meant that you really want them to be InnoDB. If InnoDB is not available, you need to fix your MySQL deployment. Otherwise, all of the work you did expecting transactions to work correctly is now out the window.
      • STRICT_ALL_TABLES: Goes along with STRICT_TRANS_TABLES, but why would you need two modes for this? This also goes with NO_ENGINE_SUBSTITUTION. If you set STRICT_TRANS_TABLES and mark all of your tables as InnoDB, but InnoDB is not available and you forgot to set NO_ENGINE_SUBSTITUTION, not only do you lose your transactional capabilities but you also run the risk that your inserts will not work in strict mode and thus may insert bad data. This is just stupid.

      Don't get me wrong, it's nice to have these options. I just think that it's silly that some of the more important modes aren't set as the default. Thus, even though the option is there to change it, the default behavior is the same as what people have been complaining about for a long time now, and just having the option to change it is not a full fix.

      And we need to stop saying "everyone is ahead of MySQL" when the only valid comparison is Postgres.

      That comparison is only valid if the criteria is, "Freely available open source database engines."

  2. Just in time... by Martin+Blank · · Score: 5, Interesting

    Sneaking in just in time before MS SQL 2005 can get out the door (or perhaps just after) is good for this.

    I recently showed the latest rev to the SQL devs here, and they were most impressed. Most of the complaints about it were gone; the new GUI is miles beyond what they had before, and the new features (views, stored procedures, better VARCHAR support) have people thinking that for smaller projects, MySQL will work out just as well as MS-SQL, and at a fraction of the cost, if any cost at all.

    --
    You can never go home again... but I guess you can shop there.
  3. Re:Great! by bcat24 · · Score: 3, Informative

    See the MySQL documentation for triggers, views, and stored procedures, respectively. To answer your question, if you don't know what they are, you probably don't need them.

  4. Re:MySQL has been, and always will be sub standard by TinyManCan · · Score: 4, Insightful

    Not everyone needs the same set of features in their database product. Some people want something that is very lightweight and fast.

    Other people want bulletproof "unbreakable" databases with thousands of features. Some people want something right in the middle.

    Having a variety of solid choices is not a bad thing. You should't be affraid of a little competition, as it is good for the entire market.

  5. Still Not an Enterprise Solution by WhoDey · · Score: 3, Insightful

    As much as I love (and use) mySQL, it's still not, nor will it likely ever be (never say never) an enterprise solution. Prove to me that mySQL is robust enough to be the backend service for a major bank's mortgage application, for example. It's simply not. As a previous poster already mentioned, mySQL has finally caught up to the base set of features that all major DBMS's had years ago. Now, after that rant, I will say this. mySQL is great at what it's designed to do. I use mySQL as the backend for personal websites and applications. It's (relatively) lightweight, simple, easy to administer, and, best of all, free as in beer (not withstanding products purchased from mySQL AB). So before you get all huffy about what I said in the first paragraph, just remember that mySQL is great at what it's made for, it's just not made to be an enterprise solution.

    1. Re:Still Not an Enterprise Solution by gtoomey · · Score: 4, Insightful
      You can't compare Oracle (a Boeing 747) to MySQL (a Cessna). But there are a lot more Cesnas sold than Boeings.

      There's a very big niche for smaller DBMSs. Plus MySQL tends to be fast and the feature set is growing.

    2. Re:Still Not an Enterprise Solution by Circuit+Breaker · · Score: 2, Insightful

      Ahhmm.

      Most likely, your bank is running its mortgage application on a seven year old database. Many of these apps are actually running on much older hardware/software combinations. I don't think mortgages have changed that much in the last 10 years or so.

      Newer != Better, New Features != Required Features.

    3. Re:Still Not an Enterprise Solution by hobuddy · · Score: 2, Informative

      You're right, and it's fine for MySQL to be a Cessna.

      But for many years, MySQL proponents have, in blatant defiance of the facts, claimed that their Cessna could seat 275 passengers and cross the Pacific in one hop. If MySQL lacked a feature, proponents claimed the feature was unnecessary fluff. As soon as the feature was added, they announced that "MySQL is ready to run with the big dogs." When the features in question were utterly fundamental to effectively exploiting the power of the relational database model, this tactic made MySQL proponents look like they were either ignorant or unabashedly dishonest.

      That's why so many people today have a negative gut reaction to MySQL: the history of blatantly distortionary marketing, not the entirely justifiable choice of market segment.

      --
      Erlang.org: wow
  6. Re:Great! by LochNess · · Score: 4, Informative

    A trigger is something that is invoked on the database server when a predefined even occurs. For instance, an update to table 1 in database A could make the database server update table 2 in database B automatically.

    A view is a way of making a pseudo-table. You can create something that looks like a single table, but can contain columns from multiple tables. If you have table 1 with columns A, B, C, D and table 2 with columns E, F, G, H , you can create a view 3 with columns A, C, F, H.

    A stored procedure is something that is precompiled and put on the database server that performs a number of actions when called by a client. It can replace a complex series of SQL statements, say, in such a way that performance is much improved over having separate statements that would need to make multiple calls to the server.

  7. Playing catchup... by slashname3 · · Score: 2, Insightful

    So they finally add features that postgresql has. And don't forget the more difficult to use licensing they have imposed compared to postgresql.

    1. Re:Playing catchup... by bani · · Score: 2, Insightful

      Yeah, because all the world is a nail and postgresql is the hammer.

      It's always easier when you view the entire universe in black and white.

    2. Re:Playing catchup... by mdielmann · · Score: 2, Interesting

      Please give me an example where mySQL is a better choice for an application as opposed to PostgreSQL. I can only think of two, neither of which point to mySQL being a superior product.

      --
      Sure I'm paranoid, but am I paranoid enough?
    3. Re:Playing catchup... by jrumney · · Score: 2, Insightful

      It's not the GPL that is the problem, it is MySQL's interpretation of it (distributing your program on the same media as MySQL is listed in their FAQ as a reason why you would need a commercial license), and the fact that they GPL the client APIs.

  8. Re:MySQL has been, and always will be sub standard by Scoria · · Score: 2, Informative

    Oracle has just announced that they are open sourcing their famous database platform. Long live free software.

    The above post is factually incorrect. Oracle acquired Innobase Oy, the firm responsible for InnoDB, a database engine commonly used with MySQL. Many people are obviously skeptical of this acquisition.

    It's highly unlikely that they would ever donate their enterprise product to the open-source community. Suffice it to say that the shareholders would not be pleased with a bankruptcy filing.

    --
    Do you like German cars?
  9. No, it hasn't by Anonymous Coward · · Score: 2, Insightful
    1. MySQL still requires you to choose a particular (non-default!!) table type in order to have ACID
    2. MySQL still has non-standard syntax and semantics
    3. MySQL still has a non-standard and broken user/permission system
    4. MySQL Still doesn't have nested queries

    I was using all of these in PostgreSQL in 1999.

    1. Re:No, it hasn't by Michalson · · Score: 3, Interesting

      Almost every database out there impliments an ISO or similar SQL standard as it's base (SQL-92 in most cases). They then build on top of that by adding their own features, while still supporting the common SQL syntax. It's not about being a barebones implimentation of a standard, it's about supporting the standard as your base.

      PostgreSQL supports SQL-92, while adding it's own extra features (which describes most other databases like Oracle and MS SQL too), including the support of the "LIMIT" statement. MySQL doesn't support any standard base, instead existing as an arbitrary mish mash of standard and propritary SQL. It wasn't until the current version, 4, that MySQL even bothered to add support for UNION.

      With every other database you can start working safe in the knowledge that while having it's own extensions, you're working with a normal "SQL" database. MySQL, while posing as SQL, has little if anything in common (in particular see threads about optimization - getting fast code in MySQL means learning an entirely new system filled with quirks and vomit inducing workarounds to solve language faults)

    2. Re:No, it hasn't by prockcore · · Score: 2, Informative

      MySQL Still doesn't have nested queries

      Yes it does. It has for 2 years now.

    3. Re:No, it hasn't by drdink · · Score: 2, Interesting

      Try reading this to understand just how broken MySQL (and others) is.

      --
      Beware, Nugget is watching... See?
    4. Re:No, it hasn't by jadavis · · Score: 4, Interesting

      MySQL still requires you to choose a particular (non-default!!) table type in order to have ACID

      And with Oracle's purchase of InnoBase, maker of InnoDB, there is a reasonable chance that MySQL will end up dropping the InnoDB storage engine. After all, since InnoDB is GPL, MySQL AB only has a right to distribute InnoDB under a commercial license because of a contract with InnoBase. Here are the possible outcomes:

      (1) Oracle renews the contract, and nobody worries until next time it comes up for renewal.

      Unlikely. Why do you think Oracle bought InnoBase? Not to be nice, that's for sure.

      (2) Oracle doesn't renew the contract, MySQL continues development, and drops it from their commercial version.

      Approximately 0% chance of happening. What's in it for MySQL aside from the bad PR of having a commercial version worse than the GPL version?

      (3) Oracle doesn't renew the contract, MySQL drops support for InnoDB, and the MySQL community forks, and MySQL develops another storage engine.

      Could happen. I have my doubts that would go very smoothly in the timeframe allowed. Most likely some functionality would change, breaking compatibility with existing InnoDB applications.

      (4) Oracle doesn't renew the contract, MySQL drops support for InnoDB, and the MySQL community forks, and MySQL doesn't develop another storage engine.

      Seems likely, although they lose ACID and foreign keys, which are the most important "Enterprise" features of all.

      So, it seems pretty much like #3 or #4, neither of which is good for the MySQL users. Expect MySQL AB to start preparing by warming up to BerkeleyDB to see if they can make that storage layer work. Expect MySQL AB to start spreading propoganda about how foreign keys and ACID really aren't necessary and only slow the database down (they can just un-rewrite some history and the propoganda is already there!). And expect them to try to make something out of SAP DB / MAX DB in a hurry. They'll try to get MySQL 5 out ASAP so that the impending problems with InnoDB don't take steam away from their release.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    5. Re:No, it hasn't by jadavis · · Score: 2, Interesting

      Silently truncating strings inserted into a varchar(x) field.

      Allowing dates like Feb 31st.

      Truncating numbers silently.

      Strange NULL handling.

      A lot more.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  10. Attention! by Slashdiddly · · Score: 3, Interesting

    You have attempted to launch a SQL injection attack on slashdot.
    You have failed.
    Please try again with the correct schema.

  11. That's only 3 hits/second. by CyricZ · · Score: 4, Interesting

    What sort of hardware is behind RubyForge?

    240000 hits/day is just under 3 hits/second, after all.

    When you consider the power of today's hardware, it should be able to cope with such a load, even when doing fairly heavy database activity.

    --
    Cyric Zndovzny at your service.
    1. Re:That's only 3 hits/second. by tcopeland · · Score: 2, Informative

      Sorry for the delay in replying, here's a description of the hardware.

      I should really do an analysis of how many queries the DB processes per day/hour/whatever; that would be more useful.

  12. Re:SQL by Evangelion · · Score: 2, Funny

    ERROR 1064: You have an error in your SQL syntax near '5
    )' at line 6

  13. MySQL's biggest problem by ShatteredDream · · Score: 3, Funny

    It makes no sense why they didn't buy out Innobase a while ago. Now that Oracle owns Innobase, they are ultimately at Oracle's mercy for much of their development since MySQL uses Innobase's code for a lot of their work. They really should have bought them out a while ago and integrated them into MySQL as a company before Oracle could get their hands on them.

    1. Re:MySQL's biggest problem by rnicey · · Score: 2, Interesting

      I'm hoping, because they didn't need to.

      From what I understand there are several developers at MySQL who understand the innodb codebase extremely well. The first smell of trouble from Oracle and they fork the last GPL version and take it from there.

      I personally believe that Oracle bought Innobase to get their hands on the developers hoping to starve development on innodb. I hope that that isn't the case, or even possible.

      Innodb, imho, is a seriously nice transaction engine. It's very very Oracle in it's design. I'm still not entirely sure why they haven't thrown out MyISAM in favour of it. It performs just as well and has no downsides. The old myth of keeping it lean and fast in favour of MyISAM is a bunch of rot. InnoDB is extremely fast.

    2. Re:MySQL's biggest problem by Decibel · · Score: 2, Informative

      The first smell of trouble from Oracle and they fork the last GPL version and take it from there.

      And can't use it in their commercial product.

      If they can't get their license for InnoDB renewed, their commercial sales are in big trouble.

  14. sure, if hits are uniformly distributed by jbellis · · Score: 2, Insightful

    they never are, though.

    it's probably more like "8 hits per second for 8 hours; 1 hps for 16."

    which is still a joke for static content, but for dynamic, it's respectable.

  15. only so far, indeed by vena · · Score: 2, Interesting

    I mean, I never see a host offering MySQL. all they offer is PostgreSQL!

  16. Re:MySQL has been, and always will be sub standard by A+beautiful+mind · · Score: 2, Insightful

    So maybe people will clean up Oracle's _nightmarish_ security track record, because unfixed critical bugs for years is not an uncommon sight in Oracle land. I'd take security over features anytime.

    Don't get me wrong, i know you're just a troll, although MySQL was/is lacking in some ways, as i'm perfectly aware of that, but nothing compares to not giving a sh*t about security especially in case of an enterprise level software costing so much in cash and resources.

    These Oracle issues are well known as a lot of security experts prove it day by day.

    --
    It takes a man to suffer ignorance and smile
    Be yourself no matter what they say
  17. What were banks using years ago... by mgkimsal2 · · Score: 2, Interesting

    Yes, mostly mainframes, but I've no doubt that some industries were running
    "enterprise" apps 5 years ago on platforms that aren't as robust as MySQL5 is now. Yes, software has become more demanding in the past few years, but the fundamentals haven't changed. If you could run 'enterprise' solutions on SQL Server 6.5 (and I saw companies doing it - and gosh, they didn't even have row level locking!) surely some "enterprise" industries can use MySQL5 today.

    1. Re:What were banks using years ago... by kpharmer · · Score: 3, Informative

      > Yes, mostly mainframes, but I've no doubt that some industries were running
      > "enterprise" apps 5 years ago on platforms that aren't as robust as MySQL5
      > is now.

      Ah, good question. Here's how to look at this:

      1. mysql is just now in v5 putting in pieces that most commercial products had 10-20 years ago:
              - views (been around since something like 1981 in db2 & oracle)
              - triggers (been around since around 1995)
              - subselects (been around in db2/oracle since 1981 or so, in mysql for what? 1 year?)
              - transactions (been around in db2/oracle since around 1981, in mysql via innodb for 2 years)
              - online backups (been around 10 years? mysql still requires a separate product)
              - stored procs (been around 10 years? mysql just getting to it)

      2. data quality - mysql has:
              - silent errors
              - silent data truncations & conversions

      3. standardization - mysql has:
              - quite a few deviations from ansi sql - everything from comments to weird create statements
              - historically the lack of views, transactions, stored procs, triggers, and poor join performance meant that many queries had to be completely rewritten for mysql

      4. performance
              - mysql's performance reputation was built upon easily-cached data that could be easily looked up using simple indexes on mysql. Its performance of large queries (select many/most rows) stank, and its write performance was horrible - since required table locking.
              - mysql's performance on innodb was better for mixed environments, but innodb has a bloat problem that can get serious.
              - no support for query parallelism, partitioning, etc - isn't 1/40th the speed of a commercial product for many queries.
              - mysql's optimizer is trivial - and can't be relied upon for complex queries (> 5 tables)

      No, you can live without row locking - as long as you've got at least page-level locking. It's the accumulation of all the other stuff that makes you want to run from it.

  18. Re:Data Dependencies & Reliability by MOBE2001 · · Score: 2, Insightful

    Don't be silly. PostgreSQL has had this feature for ages (atleast since 7.x days) implemented via NOTIFY, which interested listeners can register to be notified of.

    Thank you. But that is not what I meant. There should be a software mechanism that automatically identifies dependencies and resolves them. Leaving it to the programmer does not solve the problem because programmers come and go and may not be aware of old dependencies. The problem is especially annoying in legacy systems. Modifications made to a complex system can have unforeseen consequences if programmers are not aware of the dependencies.

  19. Still no "device"/single file support by Twillerror · · Score: 3, Insightful

    One of the biggest advantages of enterprise level dbs is that they are not file based. That is there is one or more files that can store many table/indexes/etc.

    Postgres recently added tablespaces, which allow you to specify a sub folder for these files. This is better then before, but not nearly where it needs to be.

    There are advantages to having single files versus a larger file, but most are administrative in nature. It can also lessen the effect of corruption. A sinlge table might fail and would not effect others. If a big database file corrupts it can damage a lot of data.

    Having a single files allows quite a few things.

    First it greatly reduces File system level fragmentation. The file grows once and the sectors are right next to each other. When you have 10+ gigs of data this is a real concern.

    Second it create a unified caching mechanism. The big file is broken into pages, generally 8k, which in turn store data rows. The data is not only user data, but indexes, system information. Other pages are used to store stats about other pages, and have header information about the file itself. Why is this important to caching, because you simply have a cache table, everytime a page is loaded it gets cached. Writing to page happens in memory and then written to disk. Enterprise dbs have huge caches. This is why 64 bit is so important for dbs, so we can have larger then 4 gig caches.

    Third is backing up. Some might say the file backup is easier, I beg to differ. Especailly when it gets big. When you go to backup you backup each page in the file. You mark each one as being backedup. At the end of the backup you backup the write ahead log. This allows you to restore to exactly the time the backup finished. Lastly, a diff backup simple looks at each page that has changed since the backup and backs only those pages up. Diffs can be very fast and faster to restore then a write ahead log.

    Also, single files on different drives arrays to increase performance. This is also capable with tablespaces. The good part is that the database knows only the file id that tables go on, and then file id corresponds to a file name on any path. With the right tool you can move the files around easily.

    Replication is also easier because writes are to a file id and page id. The replica database can have files place on any drive at any map point as long as the data.

    Both mysql and postgres got a way to go, but they are very nice products and one day can easily compete with the big boys. Although it will be a while before they are able to run high end clustered box with shared storage and super high speed interconnects, but if you need that kind of power, you've probably got the money...actually you absolutly do if you can afford the hardware.

  20. mySQL seems to be the one not cutting.... by woodsrunner · · Score: 2, Informative
    Read the whole doc and they tell how solid the tables are:

    Sleepycat Software has provided MySQL with the Berkeley DB transactional storage engine. This storage engine typically is called BDB for short. Support for the BDB storage engine is included in MySQL source distributions is activated in MySQL-Max binary distributions.

    BDB tables may have a greater chance of surviving crashes and are also capable of COMMIT and ROLLBACK operations on transactions. The MySQL source distribution comes with a BDB distribution that is patched to make it work with MySQL. You cannot use a non-patched version of BDB with MySQL.


    It works quite nicely and I hope they take the opportunity to improve from both mySQL and Sleepycat sides. It's always been my favorite table choice with mySQL.

    Mostly I bring it up to get out of the Oracle bought InnoDB rut because one of the cool features of mySQL is the availability of tables to use. And I guess that is one of the great features of open source in general.
  21. The negative comments have gone from... by puppetman · · Score: 4, Insightful

    "MySQL doesn't have triggers or stored procedures and views" to "Even if it does have triggers, stored procedures and views, it's still not a real database like Postgres/Oracle/SQLServer".

    We have two websites, Boats.com and Yachtworld.com - Boats has an Oracle backend databsae, and YW has MySQL using the InnoDB engine.

    The uptime is about the same for the two. We've had some issues on the Yachtworld database box due to 3ware drivers in Linux - they were corrupting pages in the database. Guess what? Innodb recovered without any lost data. Twice. This was a driver/hardware/linux issue, not a MySQL issue. We now appear to have a stable set of drivers, and I expect the MySQL database to hit 100% uptime pretty much every month.

    Yachtworld gets several million distict page views per day, whereas Boats.com gets half a million.

    Our MySQL database runs on a dual-opteron server, with 8 gig of RAM, with 6 gig of it allocated to the innodb block buffer pool (it caches row and index data so you don't have to go to disk).

    Try doing that in Oracle 10g on Linux. The SGA (Shared Global Area) can't get larger than 1.7 gig unless you,

    1) Use memory as a temporary file system so that Oracle can cache a bit more, and you also get the benefit of dicking around for several days, trying to configure your machine to try to take advantage of it (if it even can - we were never successful).
    2) Remap all the shared libraries so that they load in a lower memory address, to squeeze another few hundred meg of memory.

    Postgres (last I checked) preferred to let the OS do the data-caching. Thanks, but no thanks. And no 64-bit version (though I've read a few people have managed to compile one, I wouldn't trust it unless Postgres gave it the thumbs up).

    MySQL with InnoDB is straighforward (it's use of tablespaces, replication, tuning, and even compiling from source - someone with mediocre Linux skills like myself can do it without issue every time).

    MySQL with InnoDB is very fast, very reliable, and has awesome support via the MySQL mailing lists.

    MySQL is very well documented, with lots of great third party books that don't cost an arm and a leg (unlike an Oracle library).

    MySQL does not have stored procedures, triggers, and views in the current production version.

    Here's what I think of that:

    1) Triggers are hidden application logic that are very hard to debug, and are easily overlooked or forgotten by developers. Business logic (other than defensive logic like unique indexes, primary keys, foreign keys, not-null columns) does not belong in the database. They belong in the middle tier. They also make it much more difficult to move to another database.

    2) Stored procedures are like PERL - it's very easy to make a mess unless you are very careful. They are also hidden logic, and very difficult to debug. And again, keep that logic out of the database. They also make it much more difficult to move to another database.

    3) Views are a nice feature, but most often used to support business and reporting. I don't like managers connecting to the database to run queries (SELECT * FROM very_large_table_1, very_large_table_2; and suddenly you have cartesian join that results in tens of millions of rows coming back, bogging everything down). To do reports, views aren't necessary.

    If you think MySQL is not a "real" database, it is, and has been since 4.0. As an Oracle (and now MySQL DBA), I can honestly say that I can't wait to dump Oracle and get the Boats.com website over to MySQL.

    And for the few people who made comments like, "Do you really want your bank running on MySQL?": many banks run on old, legacy hardware and systems. Transactions are written out in many places (with geographic diversity) to ensure that a hardware or software crash is recoverable. There is no reason why you couldn't put MySQL in a situation like that, so long as the same precautions are taken.

    1. Re:The negative comments have gone from... by farnsworth · · Score: 3, Informative
      Triggers are hidden application logic that are very hard to debug

      Triggers are hidden *data* logic, and they should be hidden. They have the added benefit of being asyncronous if you choose, so if you need to write data fast, you can still lay it out in another format, or do something else arbitrary to it.

      Stored procedures are like PERL

      Agreed. But when you need them, you need them. They also go hand-in-hand with triggers frequently.

      Views are a nice feature, but most often used to support business and reporting.

      Views are an abstracted view of data. You can have a table called subscribers with lots of columns that tell you the status of the subscriber, and a view called current_subscribers that encapsulates all that logic.

      (psuedo sql)
      create table subscribers (id, start_date, end_date, cancelled, payment_is_late, is_overdue);

      create view current_subscribers as select id from subscribers where start_date now() and cancelled = 'N' and is_overdue = 'N';

      You could argue that this logic belongs in you DAO, but that only works if you have one DAO runtime, which is not true for a lot of application environments.

      --

      There aint no pancake so thin it doesn't have two sides.

    2. Re:The negative comments have gone from... by asdfghjklqwertyuiop · · Score: 2, Interesting

      3) Views are a nice feature, but most often used to support business and reporting. I don't like managers connecting to the database to run queries (SELECT * FROM very_large_table_1, very_large_table_2; and suddenly you have cartesian join that results in tens of millions of rows coming back, bogging everything down). To do reports, views aren't necessary.


      I'd say they're more often used to implement security than for reporting these days. If you've got a table which you only want certain rows or columns to be visible to particular users, generate a query that yields the right data for them and turn it into a view. Then grant them permissions to the view but not to the underlying tables.

    3. Re:The negative comments have gone from... by hobuddy · · Score: 2, Interesting

      Views are a nice feature, but most often used to support business and reporting. I don't like managers connecting to the database to run queries.

      Yeah, what kind of crazy person would use a database engine to support managers in making business decisions. Wild, I tell you, just far out!

      The truth is that since MySQL doesn't allow you to define constraints on how long queries launched by a specific user can run, you've concluded that allowing ad hoc queries is a bad practice. That's tunnel vision, not insight.

      --
      Erlang.org: wow
    4. Re:The negative comments have gone from... by kpharmer · · Score: 4, Insightful

      Regarding memory:
      - I haven't tuned oracle memory in forever, but it sounds like you're trying to use 8 gbytes of memory
      on a 32-bit cpu. In that case oracle and db2 are both limited to 1-3.2 gbytes of memory depending
      on the os. There are ways of getting around that limitation but they are os-specific. On 64-bit
      CPUs, everything is very simple.
      - btw, putting most of your memory into a single buffer pool is seldom the best way to manage your
      memory: ideally you would create a few sets of buffer pools for different types of tables. That's
      the best way to increase your cache hits: indexes and all small tables pretty much just live in
      memory at that point.

      Regarding Innodb:
      - very fast? compared to what? writing to myisam? well, sure, but that's about it.
      - keep in mind that at a few million rows and several million queries, you shouldn't have
      a problem with this data in any database. This is small. Unless of course your queries
      are complex, are frequently reading 50,000 rows then aggregating that data into trends,
      counts, etc. Of course, if you are - then oracle's parallel query and partitioning will
      deliver great performance - possibly *dozens* of times faster than what mysql can do.

      Triggers:
      - as long as you keep it simple they are wonderful and are still easy to port. You can with
      triggers:
      - auto-populate some columns that the application doesn't require, but might be useful in
      partitioning the data (assuming your database supports partitioning).
      - populate denormalized tables strictly for reporting or searching
      - populate history tables with changes to all data in various important tables
      - capture changes in order to copy data to another database
      - etc
      - yes, you could do many of these things from within the application. but it'll be harder. Why
      make life hard?
      - and sometimes you *can't* do these things from within the app - it's closed source, but luckily
      for you it's on a database that supports triggers.

      Stored Procedures
      - again, keep it simple and they are very useful and not at all difficult to port between databases
      - when validation is performed here it allows you to *easily* enable multiple applications
      to write to the database. I'm working on a project right now in which I've got to allow another
      department to create a portal to one of our databases. The folks in this department can barely
      write SQL, and I'm not interested in them training on our dime. We're giving them stored
      procedures that they won't be able to screw up. Much, much safer this way!
      - also gives your dba the ability to change the physical database (adjust for changes in business,
      performance, security, etc) without having to change all the applications: the change can be
      encapsulated.
      - and sometimes you *can't* do these things from within the app - it's closed source, but luckily
      for you it's on a database that supports triggers.

      Views
      - again, this gives you a ton of flexibility
      - for example: in most of my databases I don't give de

    5. Re:The negative comments have gone from... by nconway · · Score: 2, Informative
      Postgres (last I checked) preferred to let the OS do the data-caching. Thanks, but no thanks.


      Well, Postgres does do its own caching in userspace (see the shared_buffers configuration parameter and related documentation). It just does that caching in addition to (or rather, on top of) the caching and I/O scheduling done by the kernel. Why do you consider this to be a problem?

      (Yes, letting the kernel do most of the caching does result in a minor performance hit, but I think that the amount of work required to implement raw I/O doesn't justify the returns, at least at this point.)

      And no 64-bit version [of Postgres] (though I've read a few people have managed to compile one, I wouldn't trust it unless Postgres gave it the thumbs up).


      This is not true: Postgres has supported 64-bit architectures for many years. The official list of supported platforms includes many 64-bit architectures (AMD64, IA64, Alpha, Sparc64, ppc64, MIPS, PA-RISC).
    6. Re:The negative comments have gone from... by Philodoxx · · Score: 2, Informative
      1) Triggers are hidden application logic that are very hard to debug, and are easily overlooked or forgotten by developers. Business logic (other than defensive logic like unique indexes, primary keys, foreign keys, not-null columns) does not belong in the database. They belong in the middle tier. They also make it much more difficult to move to another database.
      I completely disagree. First off you should have the source for the triggers stored somewhere sane, and secondly sometimes the best triggers are ones that do really mundane things like altering data in other tables so that you don't have to to do it on every insert/update/delete.
      If you think MySQL is not a "real" database, it is, and has been since 4.0. As an Oracle (and now MySQL DBA), I can honestly say that I can't wait to dump Oracle and get the Boats.com website over to MySQL.
      Nobody can blame you for not wanting to administer Oracle, but MySQL is not the way to go. I'm sure when you were learning to ride a bike, you saw no need to take off the training wheels. It's also not like you have a choice of MySQL and Oracle, there is a sea of alternatives out there.
      2) Stored procedures are like PERL - it's very easy to make a mess unless you are very careful. They are also hidden logic, and very difficult to debug. And again, keep that logic out of the database. They also make it much more difficult to move to another database
      Again, I completely disagree. First off stored procedures are compiled and optimized by your DBMS, so they are very fast. Secondly it takes load off the client computer, and puts it towards the "beefy" host. Thirdly it makes programming much more logical. Personally, I would rather put "call get_formatted_order(x)" in code, than doing all of the SQL in the program which can be just as bad as far as intelligbility goes. Oh yeah, and keep the source code for all your stored procedures somewhere handy!
      3) Views are a nice feature, but most often used to support business and reporting. I don't like managers connecting to the database to run queries (SELECT * FROM very_large_table_1, very_large_table_2; and suddenly you have cartesian join that results in tens of millions of rows coming back, bogging everything down). To do reports, views aren't necessary.
      Views are meant to abstract your business logic (in combination with functions/stored procedures) from the actual implementation of the database.
      --
      Oh, a lesson in history from Mr. I'm my own grandpa.
    7. Re:The negative comments have gone from... by kpharmer · · Score: 2, Informative

      > Are you kidding? Have you ever priced out a real Oracle license for a web-based application? (IE
      > unlimited users or CPU basaed, which is what Oracle requires for anything that allows the general
      > Internet to use it).

      You're right - i was thinking of other applications. I shouldn't have since the parent had mentioned a million hits.

      Not positive on what the current unlimited users oracle license is for two cpus. But the license cost goes up steeply for unlimited users. For DB2 I think it the cheapest unlimited user license is probably $7500 / CPU (list). Even assuming a substantial discount, mysql will be cheaper.

  22. Re:PostgreSQL has 2PC! by ocelotbob · · Score: 2, Informative
    --

    Marxism is the opiate of dumbasses

  23. Re:I still can't believe .. by Kemuri · · Score: 2, Informative

    Totally offtopic I guess. But..

    I hope the interview on Groklaw with Marten Mickos (MySQL AB CEO) will help you
    out of your missery..

        http://www.groklaw.net/article.php?story=200510112 11450706

  24. Re:Performance wise.. by commanderfoxtrot · · Score: 4, Informative

    Very few (recent) comparisons around. From my experience, however, if you're running a simple web site with many SELECTs over a single table then MySQL may well suffice. If you're doing serious stuff with multiple table/view joins then you should move up a gear and use PostgreSQL.

    I've moved completely to PostgreSQL (works beautifully on core Drupal too) and have found complex queries complete in a fraction of the time. I had a complicated application which had multiple threads inserting, updating and reading all at the same time- complete run-time was reduced to a tenth by using PostgreSQL.

    It works for me- just make sure you use ADODB in PHP or Perl/DBI to make switching easy when you hit the MySQL limits.

    One more thing: I work with serious mainframe DB2 during the day. MySQL just doesn't compare. Postgres feels closer.

    --
    http://blog.grcm.net/
  25. We have the data available to us. by CyricZ · · Score: 2, Informative

    We have the data available to us.

    http://rubyforge.org/docman/view.php/5/11/rubyforg e_site_status.html

    The PostgreSQL database contains about 3.2 million records and takes up 600 MB of disk space.

    600 MB is obviously not a few TB. It's not even 1 GB!

    RubyForge is currently running on a single machine with two 2.8 GHz Xeon CPUs, 2 GB of RAM, and a hardware RAID 5 SCSI array of 210 GB.

    They have 2 GB of RAM for a 600 MB database. Even assuming the web server, mail server, Linux, etc., take half of the available real memory (probably unlikely), that still leaves 1 GB or so for the database. More than enough for the database itself to be resident in RAM.

    --
    Cyric Zndovzny at your service.
  26. Add to these complaints by einhverfr · · Score: 2, Informative

    1) Inconsistancy in how create statements are handled. For example:
    create table table2 (
    id int autoincriment,
    fk int references table1 (id)
    ) type=innodb;

    does not enforce the foreign key even in 5.0 while:
    create table table2(
    id int autoincriment,
    fk int,
    foreign key (fk) references table1 (id)
    ) type=innodb;

    does enforce them.

    2) Even with strict mode, any application can turn it off, allowing it to add bad data (try adding Feb 31, 20005 as a date in MySQL with strict mode off). This is a violation of Date's Central Rule.

    3) "clustering" only works on tables that are cached entirely in RAM so if you use this you must have a beefy machine.

    I know you like DB2, so you won't mind if I point out that an area Oracle has a problem is that it treats empty strings and NULL varchars as identical. Unfortunately no RDBMS is perfect.

    Now for additional information on your complaints....

    quite a few deviations from ansi sql - everything from comments to weird create statements

    One should point out specifically that operators are non-standard leading to *very* unportable code.

    mysql's performance on innodb was better for mixed environments, but innodb has a bloat problem that can get serious.

    This is caused by the fact that innodb uses something like PostgreSQL's MVCC system but lacks an ability to vacuum the tables.... And MySQL people attack PostgreSQL for the need to vacuum the database....

    no support for query parallelism, partitioning, etc - isn't 1/40th the speed of a commercial product for many queries.

    BTW, PostgreSQL 8.1 will have much more useful table partitioning, and there is a project (Bizgress) aimed at adding parallelism across nodes in business intelligence environments (we had this discussion before once on Slashdot ;-) )

    --

    LedgerSMB: Open source Accounting/ERP
  27. InnoBase and Oracle acquisition by kbahey · · Score: 2, Interesting

    What worries me is that new acquisition of InnoBase by Oracle a few days ago.

    InnoBase is the maker of InnoDB, which is the full featured dual licensed storage engine with transactions, referential integrity, hot backups and more.

    The GPL version of MySQL will not be affected should Oracle decide to misbehave.

    What may get affected is the commerical version of MySQL. Oracle can demand a hefty price for relicensing InnoDB, when the contract is up for renewal hence choking MySQL AB financially, by depriving it from the revenue stream of commerical licensing MySQL with InnoDB.

    This may in turn cause long term trouble for the community by depriving it from contributions by MySQL.

    I hope Oracle does not do that, but still, they are a corporation with no open source culture, and may have the mentality of choking the competition, using the very rules of open source dual licensing.

    Or, they may be softening MySQL to buy them cheap in the near future ....?

    1. Re:InnoBase and Oracle acquisition by Kemuri · · Score: 2, Informative


      Just for your information, InnoDB Hot Backup is not opensource and not part of MySQL.
      Rest is offtopic. :)

  28. Re:Some technical complaints though by arjenlentz · · Score: 2, Informative

    Sorry, but you're just plain wrong. MVCC is a fudamental design feature in InnoDB, and so it has been present in MySQL for over 4 years now. There's just no excuse. Facts need a source, you don't just make them up ;-)

  29. Re:Some technical complaints though by arjenlentz · · Score: 2, Insightful

    Why would a non-expert on a topic write an whitepaper about it? Makes no sense... Sorry for being so picky, but I'm just a bit fed up with that kind of nonsense. Regardless of the intent, the result is malicious as such FUD on the net hangs around and is copied and quoted. Wouldn't you rather compete by focusing purely on the positive points that your own offering provides? Anyway, your image is yours to build or undermine. It's a choice. Space from deleted rows and old versions are automatically reused, no explicit maintenance is required for this. I don't know what that person was referring to; if he/she has a valid point, I'm sure they can be more specific about the matter.

  30. Re:Some technical complaints though by Jules+Bean · · Score: 3, Insightful
    I do have one claim in there at the moment that I would like your feedback on. Those who sent me a correction early this morning mentioned that InnoDB has a bloat problem where it has trouble removing dead tuples. I have not felt like attempting to test this

    You expect people to take your analyses seriously, but you don't feel like attempting to test...?. I suggest you leave serious comparison documentation to people who do feel like testing stuff. No offence intended.

    --
    -- Any sufficiently advanced technology is indistinguishable from a perl script.
  31. Re:SQlite? by JoshDanziger · · Score: 2, Informative

    SQlite is not meant to compete with mySQL. All locking, IIRC in the most recent version is file based. Since each database is a file, this means that only a single write to a database can happen at a time. If you really need concurrent access, that's not going to scale well for large databases with many concurrent reads/writes.

    That said, SQLite is fantastic! I really mean that. I use it mostly in single-user/light-concurrency situations when a full scale DMBS isn't needed. It's great if you want to write a script/small app that deals with relational data or even a single table. It makes querying/massaging the data a breeze.

    It's also pretty good for an offline demo. If you want to demo an application that normally relies on a database server, plugging in an SQLite driver in place of, say, a mySQL driver will yield very good results. SQLite is designed to support basic syntax for a variety of databases; as long as you aren't doing anything too fancy, you should be able to just swap out the drivers and go!