Slashdot Mirror


Why MySQL Grew So Fast

jpkunst writes "Andy Oram, who attended the MySQL Users Conference which was held April 16-18 in Orlando, Florida, attempts to explain MySQL's popularity in his weblog at oreillynet.com. (More weblogs about the 2004 MySQL Users Conference can be found at the The 2004 MySQL User's Conference & Expo Blog Collection.)"

42 of 621 comments (clear)

  1. Re:It's too bad by pagan26 · · Score: 3, Interesting

    Like Access 2003 it the cream of the crop? I use Access at work and I would gladly change over to MySQL. Better yet, what would you recommend?

    --
    Open Source: Every now and then, you get what you don't pay for.
  2. Why? by Daengbo · · Score: 4, Interesting
    But MySQL's very simplicity made it so small and fast that it quickly won over small users who wouldn't even understand what they were missing and how to use the fancy features offered by "real" database engines. In particular, MySQL proved ideal for the exploding area of dynamic Web content.
    We can talk about this one for hours.
    MySQL gets a lot of heat from the DBAs here (and probably with reason), but it's kind of like bashing MS Access -- it's useful enough for most small businesses.
    1. Re:Why? by Vellmont · · Score: 5, Interesting

      I think Access is great, for what it's intended for. It's perfect for small databases where someone would otherwise use flat files. It's also a great reporting tool to use to connect to other databases via ODBC.

      The problems with Access is just that people often don't know what they're doing and create awfull legacy systems that they then expect to keep extending. That's a problem that lies between the keyboard and chair, not with Access.

      If you want a database to complain about, complain about FileMaker Pro. It's an ugly, non-relational database that seems to ecourage people to make terrible, ugly systems.

      --
      AccountKiller
  3. Re:Pretty simple. by ciroknight · · Score: 4, Interesting

    3. A very clean and easy to use API, in a language that is universally understood and almost universally portable (C) for incorporation into other products such as PHP, Perl, Python, Apache itself, and an endless amount of other applications.

    --
    "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
  4. A Good DBMS for Beginners by mattlary · · Score: 2, Interesting

    For myself and many other college students, MySQL was a great system to play with SQL and experiment on. It's easy to setup on most systems, and it's also fairly easy to use (not to mention free). Don't get me wrong- I've used other systems that are much better than MySQL, but without MySQL to get my hands dirty, I'm not sure I would have bothered with anything else.

    1. Re:A Good DBMS for Beginners by GooberToo · · Score: 3, Interesting

      The problem is, most people would disagree. Why? It's not because many hate the DB....and many do. It's because MySQL teachs many non-standard and down right bad habits. If you want a system to learn SQL or relational theory, MySQL isn't right for the task. Why? Because very little of the learned knowledge will apply to any other system. If, after all, the intent is to learn a generalized body of knowledge, then by definition, you can't use MySQL.

      If, on the other hand, your objective is to learn MySQL, then by all means, learn by using MySQL. MySQL is well known for teaching people enough to be very dangerous but never enough to produce clean, fast, effecient SQL code for other RDMBS. In other words, learning on MySQL will probably teach you how to make the least effective queries for other platforms.

  5. Re:Because they were the first to support subqueri by TheRealSlimShady · · Score: 2, Interesting
    MySQL has always been fast.

    You forgot to add an important qualifier here - for a certain set of circumstances. MySQL is one of those products that is suitable for database content that isn't changing much - it's very fast reading from the database. The numbers change quite a bit when you're doing heavier work on the database, which is where Oracle & MS-SQL (or even PostGreSQL) come into their own.

  6. MySQL got there first and was "good enough" by kcbrown · · Score: 5, Interesting
    MySQL is an interesting example of how you can be wildly successful if you're at the right place at the right time with a product that's just good enough for the mission people have in mind.

    MySQL, even now, is actually rather sparse as database engines go: it lacks stored procedures, triggers, constraints, etc., in short many of the things that a serious DBA considers necessary in a database engine.

    But the mission it was originally created for is a mission that's a very common one: a simple, network-enabled data store with a SQL interface. That it lacked transactional capabilities didn't really matter: it was good enough for what many people needed.

    So its popularity exploded. In the free software world, there weren't any other contenders at the time that were sufficiently reliable or fast to do the job. PostgreSQL back then just wasn't fast enough, and tended to eat data. Not that MySQL was perfect in that regard, mind you, but at least MySQL gave you the tools to recover your data quickly in the event of a hiccup. PostgreSQL didn't -- it required you to do a full restore from backups, whereas MySQL let you use 'isamchk' to get you up and running quickly. That made a big difference to a lot of people.

    Today the story is very different. PostgreSQL is at least as fast, if not faster, than MySQL in many situations, especially under load, and has essentially all the features needed to make it a "real" database: transactions, stored procedures, triggers, views, constraints, etc. About all it lacks now is built-in replication (there exist third-party solutions), nested transactions, and point-in-time recovery (a.k.a. archive logs), things which MySQL is not likely to get anytime soon.

    Nevertheless, despite the fact that PostgreSQL is very much a superior solution in just about every respect, MySQL is more popular and thus has better third-party support. And it's thanks to the fact that it was in the right place, at the right time, with a "good enough" feature set.

    --
    Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
    1. Re:MySQL got there first and was "good enough" by GooberToo · · Score: 2, Interesting

      Under what conditions. Notice that the part you quote even made that stipulation.

      Generally speaking, MySQL is wicked fast for a single user that only does selects. Once you leave that safety zone, it becomes a huge question mark for MySQL.

      Want transactions and ACID? Performance just dropped. Want concurrent select/insert/updates? Performance just dropped a lot! It's fairly well understood that MySQL scales poorly.

      I remember back in the day when Crays where king. Someone with a workstation came out and said, "cool! I just matched a Cray box's performance with my machine". He was talking about some off the wall benchmark. The follow up reply said, "now, run 10 instances on each system and let us know now the results." He came back saying that performance was less than 1/10 what the Cray was seeing. I mention this example because it sooo reminds me of MySQL versus just about any other real RDBMS.

      There will always be situations where MySQL is fast. It's a simple database for simple tasks. Once things start to get complex or the load ramps up, MySQL suddenly starts turn pale.

      Don't believe me? Feel free to finish reading here. It shouldn't be too hard to find pro-MySQL guys stating the same thing, though perhaps worded slightly differently.

  7. Re:Why MySQL Grew So Fast by ciroknight · · Score: 4, Interesting

    Didn't help PostgreSQL or Firebird did it?

    Being free is one thing, being fast, elegant, easy to use and administrate, having a pretty clean security record, AND being free, those traits are something to write home about.

    Yes, we know, we know, MySQL isn't 99.99999% standards compatible. Well that's something to work toward, but at the time, it was quite usable for anyone who needed to use it, therefore it was used. If the internet needed transactions for things as simple as serving dynamic pages, then MySQL probably wouldn't have prospered, but it did have what the developers needed, when they needed it.

    --
    "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
  8. Re:I strongly disagree by mcrbids · · Score: 5, Interesting

    I mean really, how many people out there can truely justify the cost of a full featured, robust database like MS-Sql? 10%? 5%?

    How about 100%!?!? Ever hear of PostgreSQL?

    ACID compliance, features that compare very nicely against MS-SQL/Oracle, foreign keys, triggers, transactions, embedded function definitions, the whole shebang.

    About the only thing that it lacks (for free) is decent clustering/replication capability - and you can buy that fairly easily in the form of patches.

    I've been using it for years, and it's a joy to work with!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  9. I've Tried PostgreSQL by jwbrown77 · · Score: 5, Interesting

    I understand it's supposed to be better because it supports more ACID compliant features (and has for a long enough time to consider them stable). I just can't seem to get the hang of PG though. I far prefer the mysql command utility (and mysqladmin) over psql, I just find it easier to use. I also don't like the way PG handles users. I find it easier to add and modify users in MySQL and set their privileges with it's table method than PG which is more configuration based. I could figure everything out, but I've been too swamped lately to learn the in's and out's of PG. That's why I continue to use MySQL, because it fits my needs. Not PG's fault, but it's one of several reasons people still use MySQL.

    --

    -----
    How can you have any pudding if you don't eat your meat?
    1. Re:I've Tried PostgreSQL by Anonymous Coward · · Score: 3, Interesting

      Use PgAdmin. Its a GUI to administering postgre databases. It makes managing privileges a joy.

      Postgres also stores users in a table which is editable like any other table (this is nice, but obviously dangerous). You don't have to do it through SQL-ish commands. All of this is made very simple by PgAdmin though.

  10. Re:I strongly disagree by Daniel+Dvorkin · · Score: 4, Interesting

    If you're interested: the database in question comprises about thirty tables, ranging in size from ~500 rows to over 200,000, with a fair number of three- to five-table joins. I'm not saying by any means that this proves MySQL is faster than Oracle for every query, but I think this is a fair-size test. Granted, it doesn't cover the multi-TB data warehouses which seem to be Oracle's primary claim to fame, but I know that some organizations with much, much larger data needs than my company use MySQL and seem to be happy with it.

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  11. Re:I strongly disagree by TheRealSlimShady · · Score: 4, Interesting
    I can tell you that identical queries on identical schemata with identical data are provably faster with MySQL than with Oracle

    ...provided the MySQL server isn't under load. Watch those queries get slower and slower the more users you add. With Oracle, watch the queries perform the same under a far greater load than MySQL will handle.

  12. Re:Picking the right tool for the job by Anonymous Coward · · Score: 5, Interesting
    The issue isn't really the lack of the feature set, but the fact that the MySQL devs used to be clueless idiots about it. Here's what the docs used to say about foreign keys:

    5.4.5.1 Reasons NOT to Use Foreign Keys constraints

    There are so many problems with foreign key constraints that we don't know where to start:

    Foreign key constraints make life very complicated, because the foreign key definitions must be stored in a database and implementing them would destroy the whole ``nice approach'' of using files that can be moved, copied, and removed.

    The speed impact is terrible for INSERT and UPDATE statements, and in this case almost all FOREIGN KEY constraint checks are useless because you usually insert records in the right tables in the right order, anyway.

    There is also a need to hold locks on many more tables when updating one table, because the side effects can cascade through the entire database. It's MUCH faster to delete records from one table first and subsequently delete them from the other tables.

    You can no longer restore a table by doing a full delete from the table and then restoring all records (from a new source or from a backup).

    If you use foreign key constraints you can't dump and restore tables unless you do so in a very specific order.

    It's very easy to do ``allowed'' circular definitions that make the tables impossible to re-create each table with a single create statement, even if the definition works and is usable.

    It's very easy to overlook FOREIGN KEY ... ON DELETE rules when one codes an application. It's not unusual that one loses a lot of important information just because a wrong or misused ON DELETE rule.

    The only nice aspect of FOREIGN KEY is that it gives ODBC and some other client programs the ability to see how a table is connected and to use this to show connection diagrams and to help in building applications.


    At this point anyone with RDBMS experience is rolling on the floor. THAT is why MySQL gets no respect.
  13. Simplest database by mnmn · · Score: 3, Interesting

    It was the simplest database at the time that was marketed well. Minisql was not marketed at all, and of course wasnt really opensource.

    People need to use SQL and need something simple and fast. Postgresql is not optimised for simple web applications out of the box.

    sqlite I think came much later, but would have fit the bill and IMHO would have taken Mysqls place early on. I know I was looking for something like sqlite making my simple website and mysql seemed to complex.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
  14. Incorporation by ae-valkyre · · Score: 2, Interesting

    Another reason is that so many (web) programs incorporated it, like vBulletin. it was free to use and easy to learn, and it was painless to deply on virtually any platform.

  15. It's all in the name or is it the license? by Anonymous Coward · · Score: 3, Interesting

    I think it does have a lot to do with the name.
    MySQL, maybe it is My-Ess-Que-Ell or maybe it is My-Sequel, but Postgresql? Postgr-ehz-Que-Ell? Postgreh-Sequel, Postgray-Que-Ell? (Does sound vaguely French.) Ugh! (Nothing against French.) Hate the name, but love the program. Although it seemed that there were more people choosing MySQL over Postgresql when I started evaluating the two, there were two key features that led me to choose Postgres(whatever) over MySQL

    1) Views (How can you have a/an SQL database and not support views!)

    2) Free license for corporate use

    So, if I chose to work with MySQL I would have to give up using views. Also, if I wanted to use it at work, I would have to convince the boss to buy a license. On the other hand if I worked with Postgres(whatever), I got views, and did not have to persuade the boss to part with any money. So it was 2 minuses in the MySQL column, versus 2 pluses in the Postgres column and the Ayes have it. After MySQL changed their license, inertia kept me going forward with Postgres (and MySQL's lack of views and triggers).

    Now that MySQL has a GPL version, it is less of an issue, but at first, it was free for non-profit use only (or so I understood), while Postgres was free for any use. It surprised me that so many would choose the non-free / less free license.

  16. Re:It's too bad by drsmithy · · Score: 2, Interesting
    For instance, the reason why the world wide web took off was because Microsoft created a HORRIFIC web browser, but since now all computers had a web broswer, everyone had access.

    But no-one used that "HORRIFIC" web browser, except to download Netscape. At least util NN4, when Netscape shot themselves in the foot (and took off most of their leg in the same shot). After that (well, until recently) Internet Explorer was a better browser - far from "HORRIFIC".

  17. Re:It's too bad by Anonymous Coward · · Score: 1, Interesting

    PHP is a highly customizable, fast-rendering and highly scalable platform...

  18. MS Access from hell by Safety+Cap · · Score: 4, Interesting
    And then they want to run enterprise level warehouse tracking, inventory, payroll and who knows what else from the little database they whipped up between Solitare games.
    My last assignment at a Big Oil Company was to produce a list of files on the shared drive, grouped by person, age, and total size. As all work at the BOC was billed, and my project was budgeted only for my time, I was not allowed to have a DBA create either an Oracle or MS SQL DB (something that would've only taken 5 minutes). I had to use MS Access; suggesting the use of FOSS would be like saying you wanted to summon Satan to get your work done.

    Things got interesting when I loaded all 2 million rows of data (one per file) into the poor POS Access DB. It took over 8 hours (I left it running and went home; it was still running when I got back. Lo and behold, it accepted every row. Trouble started when I discovered that trying to save a query or report would send the machine into la-la land. So, I had to dump the DB for every tweak of the report. After a week of messing around (time "well spent," as using Oracle/MS-SQL would have saved at least 4 days of waiting for row population), I finally got everything working, and turned in the report (something like a 500 page PDF).

    Naturally, they wanted to change the criteria and group by something else. "Sorry, but today's my last day," I grinned. "And it takes at least one full day to make any changes, assuming you got it right the first time."

    Suck. Ers.

    --
    Yeah, right.
  19. Re:I strongly disagree by dtfinch · · Score: 2, Interesting

    As far as speed, both MySQL and Oracle have their place. MySQL has a good price/performance ratio, while Oracle scales well. There are situations where one server with a couple processors and lots of ram just isn't enough for a single database. It could take hundreds of servers, several processors each, sharing hundreds of disks, and Oracle can supposedly handle that fine while still guaranteeing transactional consistency and zero down-time when one of them bites the dust.

  20. Re:I strongly disagree by Anonymous Coward · · Score: 1, Interesting

    Are you running the same queries on both MySQL and Oracle (ie, not using subselects, not using precompiled procedures, etc)?

  21. And Access is more popular still by zenzen667 · · Score: 2, Interesting
    'Popularity' is a totally unimportant benchmark. Unfortunately, I tend to find most MySQL users either:
    1. don't know enough about databases to understand why they should be using a different tool
    2. members of the 'I have a hammer, therefore this problem is a nail' sect
    3. people making money from the first two groups
    Finding someone using it and can give good technical reasons *why* they are using it is a rare find. Feel free to substitute Access, Visual Basic, Perl, C, Java, C# or C++, Windows or Bose for MySQL if you like.
  22. Question SHOULD be: Why did Postgres grow so slow? by gtoomey · · Score: 2, Interesting
    Version 4.1 of mysql is the first "usable" version. This version has subqueries, union, and derived tables. Buy still no views or synonyms.

    But Postgres has been a fully functional RDMBS for years, with the features a professional needs.

    Both can be obtained for free (though mysql is dual licenced). Maybe mysql has better marketing or offers better support, while becoming the default database for PHP?

  23. Re:I strongly disagree by Anthony+Boyd · · Score: 5, Interesting
    With Oracle, watch the queries perform the same under a far greater load than MySQL will handle.

    I call bullshit. In e-Week's tests, Oracle and MySQL were dead even under load.

  24. Re:Picking the right tool for the job by jesterzog · · Score: 4, Interesting

    If application bigotry keeps you from choosing the right tool for a job, you will be a less valuable resource to those who employ you.

    Pardon my ignorance, but what is it exactly that MySQL is good at that Postgresql isn't at least equal or better at? I'm all for using the right tool for the right job, but every time I've used at MySQL I've frequently encountered all sorts of crazy problems with no killer features to justify the change, that aren't already provided by both postgres and other databases. Maybe it's my application bigotry speaking, but I honestly can't see how MySQL is better at anything.

    The only things I can think of are the familiarity aspect, for people who are already very knowledgable about MySQL not wanting to switch, and possibly some minor issues with moving database files around on the underlying file system.

  25. Re:My Theory? by next1 · · Score: 2, Interesting

    the postgres origins are actually quite interesting - it's here.

  26. Re:Yeah... I'm gonna sqitch from Oracle to MySQL by ErikZ · · Score: 5, Interesting

    "Whatever moron made that decision needs to be outsourced to India. Thats sort of like trading in a shiny BMW for a freakin go-cart."

    I can easily think of a reason to go from Oracle to MySQL.

    1. You don't have a database that needs Oracle.

    2. Therefore downgrading will save you fat sacks of cash.

    I've known someone who was fired for choosing Oracle. They suck an enormous amount of money into the project and it was far more database than they needed.

    --
    Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
  27. Re:Note to the Mods... by jadavis · · Score: 3, Interesting

    I have a very similar story. Small company, big spending, decent business plan, very poorly implemented.

    I went to talk to the guy in charge because he got in his head to buy Oracle. I was trying to convinve him to use MySQL because of cost. He thought Oracle was the only way a company could operate.

    Here's what actually happened:
    (1) We settled on Sybase
    (2) Took forever to get plans worked out and the software in place (it would have taken a matter of hours for me to get MySQL in place...)
    (3) We never moved off our "temporary development" system that was a flat text file[1]
    (4) Investors realized nothing was making it to market and too much was being spent, and company went under.

    [1] The flat text file -- 100's of MB -- was being read several times each time the front page of the company website was loaded. And no, nobody ever got sybase in place behind it. After all, details like that don't impress investors.

    Disclaimer: I now use postgresql. At the time ('99) postgresql still had some rough edges, but now it's the best database out there for everything that I use an RDBMS for.

    --
    Social scientists are inspired by theories; scientists are humbled by facts.
  28. Simple: It's not an RDBMS by GrouchoMarx · · Score: 2, Interesting

    The reason MySQL has been so successful is that it is NOT a relational DBMS. It doesn't have any of the features that a "real" database would have. That's the point.

    MySQL is a glorified card catalog with a reduced-SQL interface. And for the vast majority of the projects that use it, that really is all it needs.

    I say this as someone who has not written in any production SQL environments except for MS Access and MySQL. For small stuff, all I want is a card catalog with joins, and MySQL gives me that easily. I know the projects I've worked on aren't going to scale to a million rows, they're only in the few thousands, or in a few cases only a few hundred. If they start to get to the point that they're handling millions of transactions, then I'll be rewriting the whole thing anyway.

    Tell me: WHY would I want to use Oracle or even PostgreSQL for a recipe book or web calendar when MySQL requires less mental overhead for me? I wouldn't. That's like using a Mac truck to drive to the grocery store and back.

    When I start writing financial apps or systems that actually require complete integrity checking, good bye MySQL, hello Postgres. But for right now, MySQL is simple, my web host supports MySQL, and it's all these projects are going to need.

    --

    --GrouchoMarx
    Card-carrying member of the EFF, FSF, and ACLU. Are you?

  29. Re:Pretty simple. by Eric+Savage · · Score: 5, Interesting

    A tuned query set is pretty much unportable no matter what DBMS you are using. Once you start getting into maintenance tasks, vendor-specific performance boosting options (which are often the reason you've chosen a vendor), and basically anything beyound the most basic selects and inserts, you code becomes tied down to a server. Also the general disregard most servers have for ANSI means that it is only a standard in theory, not in practice.

    --

    This is not the greatest sig in the world, this is just a tribute.
  30. Well, it's MINE, innit? by kale77in · · Score: 1, Interesting

    17. Well it's MINE, innit? Says so in the name. _MY_ sql. Ya gotta like that!

    Seriously, I think a good name is half the battle with acceptance. If Postgres had called themselves MySQL -- rather than "Huh?" as most people understood them to mean by their Ingres-derived title -- and then produced some half-decent documentation occassionally...

    But they didn't.

  31. Re:simplicity translates to speed by Anonymous Coward · · Score: 2, Interesting
    MySQL's missing safety features (like constraints) wouldn't be nearly so galling if the engine didn't successfully parse and silently ignore attempts to rely on them. It also wouldn't have been very difficult for them to lock all tables by default during a transaction, and let the user avoid this by autocommit and
    SET TRANSACTION READ ONLY ISOLATION LEVEL READ UNCOMMITTED
    when they're willing to accept answers that are very fast but incorrect.
  32. Re:Yeah... I'm gonna sqitch from Oracle to MySQL by Decaff · · Score: 2, Interesting

    You are missing the point. The point is that other databases, such as Postgresql, offer virtually all the SQL features of Oracle including a reasonably compatible PL/SQL language. Oracle is not a simple database. Developers tend to use its features. MySQL can't provide those features. Other databases can.

    Suggesting a migration from Oracle specifically to MySQL is typical management bullshit along the lines of 'I have heard of both of those and they are both databases, so they must be the same'.

  33. Re:MySQL doesn't scale by Anonymous Coward · · Score: 1, Interesting

    Unlike most of what MySQL folks say, this is really an honest difference of opinion. The "best practice" from MS or Sun would be to put the biz logic in an application server, and only use the DB for integrity. However, many people still prefer to put the rules in stored procs. And for your lil VB/web app, the rules are going to inevitably end up in the client just for cost/installation considerations.

    Of course, without nested transactions, you aren't going to get very far with MySQL & an appserver, and stored procs are obviously missing, so you know what the MySQL guys will say :)

  34. Re:It's too bad by ozbon · · Score: 2, Interesting

    Now _that's_ funny. I've worked with so many organisations who think that Excel is a database, and really don't see why they should change to something else, regardless of whether it's Access, MySQL, PostGre, Oracle, or whatever.

    It's only once you've shown them a few things that are easier in anything other than Excel that they begin to understand - and in some ways that's why MySQL is useful, it provides a cheap/free alternative to investing in Oracle etc., and is useful for demonstrating the basics of why a DB is better than a spreadsheet.

    --
    I say we take off and nuke it from orbit. It's the only way to be sure...
  35. An immature DBM attracted an immature userbase by ectoraige · · Score: 2, Interesting

    Not trying to flame... talking about maturity of experience...

    Lots of people didn't care. They just wanted to stick dynamic content on their pages.

    Most of them didn't care about things like transactions. They either never heard of them in the first place, or figured they didn't need them.

    Most of them didn't care about portability.

    A few of them found that MySQL was fast when you don't care about these things, and that it was easier to install. The told others, and it became 'cool'...

    I'm not knocking the above, most of them were probably self taught, and have learned a lot since. The MySQL userbase seems to have matured a lot, and as MySQL becomes more like a 'real' DBM, it's users are becoming more like 'real' SQL admins.

    The only real competition at the time was postgres, and it was slower, and possibly more difficult to install. Those of us like me who cared about things like transactions took the extra time to make it work, because we wanted what MySQL didn't offer.

    --
    Vs lbh pna ernq guvf, ybt bss abj. Tb bhgfvqr. Syl n xvgr.
  36. Re:I strongly disagree by GooberToo · · Score: 2, Interesting

    Everything you're saying is based on process-level protection provided by the OS.

    Exactly. The OS is helping to ensure database integrity.

    If the OS provides sufficently correct thread-level protection, then almost all of those issues become a dead heat.

    Except, it's impossible for the OS to sufficently correct for thread-level protection while still providing the advantages in speed of thread level IPCs. So, it's safe to say, it's impossible for a threaded implementation to, "become a dead heat", with a process based implementation in that regard.

    Also, it's not just spinning a thread vrs forking a process - process-level IPC is slower than thread-level IPC as well.

    This is true. Just the same, thread level implementations tend to require more IPC synchronization, thusly, on average, the threading IPC speed advantages tend to become noise. This is because threaded implementations tend to have much higher levels of contention on shared resources. On average, I'd consider it to be a wash.

    And process-level IPC is no safer than thread-level.

    I'm sorry, but this doesn't entirely address the issues. Have a shared resource on the stack? IF you walk on the stack, you potentially just corrupted state for ALL threads and brought the state of the entire process into question. The same holds true for shared data segments.

    If one of your processes corrupts and crashes during a write, your database is just as hosed as if a thread did it.

    Maybe, maybe not. This is why we have transactions. If the corrupt transaction fails to complete, it's rolled back. Conistency is maintained. On the other hand, it's very possible, in a threaded implementation, to actually have the field value corrupted (it's length or value, etc), and have it still be written to disk. In otherwords, as I originally stated, a process implementation greatly reduces the chances for corruption. I did not state it eliminated it.

    On Windows, at least, threading is far more performant - you _must_ thread for very fast IO, network or disk.

    Because MS made the decision to bais threads over processes. On Linux, even with the old thread implementations, threads were really LWP and were not significantly faster at spawning than processes. That was because forking on Linux so fast compared to other platforms.

    Now that linux has a non-crap thread library, that may end up being true there also.

    Well, that addresses Linux and threads, nothing else. Remember, PostgreSQL runs on many more platforms than just Linux. It's always going to be a toss up on other Unix platforms to determine which is best (threads vs process). This is exactly why Apache 2.x implemented it's hybrid model. That is, so that they would be fast on MS' platform and fast on Unix platforms, allowing each to tune best for each unique platform.

    The most reliable and performant databases in the world are threaded - thats a logical argument in favor of threading.

    Bzzz. Popularity hardly makes right. Best of all, popularity hardly invalidates the issues which I put forth when contrasting the two models.

    Bluntly, neither model is perfect. Just the same, it's far *easier* to maintain consistency, uptime, and reliability with a process implementation. Notice that none of those speak to performance. Even if you refuse to accept that threading is not inherently faster than processes, which is more important to you? ACID or speed?

  37. Re:Why MySQL is more popular than Postgres by base_chakra · · Score: 2, Interesting

    That's definitely a big part of it, but not the whole story. PostgreSQL's lack of adequate software support extends to the client side as well. There are very few options for PGSQL front-ends now (although some of them are quite good), but four years ago the selection was downright threadbare. One thing that can be said of MySQL is that MySQL AB at least offers free GUI clients.

    But, I think many people are swayed by the argument that MySQL has a much bigger grassroots support base. While technically that's true, look at the nature of the support base: thousands of redundant questions, many of which are directly related to the lack of features that supposedly makes MySQL great. We're not just talking about views and subselects here: until v4.x, MySQL even lacked UNIONs for god's sake. Fledgling developes may not be able to ask for these features by name, but that doesn't mean they don't feel the lack.

    Since working with MySQL means developing with half of the SQL9x spec tied behind your back, and considering that MySQL's documentation is inadequate (and occasionally inaccurate or misleading), it's no wonder that such a huge support base is necessary.

  38. Re:MySQL doesn't scale by plastik55 · · Score: 4, Interesting

    Do they lose money if a comment disappears? No.
    Are they liable for any consequences of losing data? No. Do they need to keep an audit trail? No.

    None of these things have anything to do with how "big" a database is.

    The kicker is, slashdot isn't very big at all! Can you come back to a story a few months later and comment on it, or even view it according to your preferences? No, it's been removed from the database because and put to static HTML because MySQL doesn't scale!

    --

    I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!