Slashdot Mirror


MYSQL & Row Level Locking

An anonymous reader noted a press release talking about how NuSphere is planning on adding row level locking to a version of MySQL due out 1Q 2001. Anyone who's used MySQL for anything with more then a few hundred thousand records (like, say, Slashdot to pick an arbitrary example) knows that this is the biggest shortcoming MySQL has... you can work around replication and transactions, but when your whole DB freezes because of one piddley write, its more then just a little annoying.

63 of 162 comments (clear)

  1. Re:SHOW ME THE CODE by g_mcbay · · Score: 2
    Agreed!!!

    These type of future announcements are unsettling. It is not really much different than Microsoft announcing products months to years in advance... It means nothing until there's something to release. Also, there's a specific danger here in the open source world... Imagine if someone were planning to add this functionality to the open source version of MySQL but didn't because of this announcement...Then imagine that the company doesn't follow through...I'm not saying we have any specific reason to distrust NuSphere...but...

  2. Re:Why lock a row when you can use a transaction? by Earlybird · · Score: 3
    Oracle, InterBase and PostgreSQL all implement a generational table algorithm. This is why they do not need transaction logs. Sybase databases and Microsoft SQL Server don't, and rely on icky transaction logs (journaling).

    Both schemes work well, but the former is potentially must faster because there is no lock contention: Nobody can ever be writing to the same piece of data, and nobody can ever be reading something that being written, unless explicitly specified in the isolation level.

  3. Re:Row locking is already implemented - here's how by SuiteSisterMary · · Score: 2
    If SALES:54 wasn't locked before, this INSERT would be successufull.
    Beside the point. Table being read, read read. You put row 54 into your locking table, then do an update to the main table. BOOM: no selects can be done; THE ENTIRE TABLE IS LOCKED. If you've got 500,000 records, and one gets updated, the other 499,999 can't be read. Who cares that you're being sure, using the locking table, that you yourself won't touch it during read; THE DATABASE AUTOMATICALLY, AND UNAVOIDABLY, LOCKS THE ENTIRE TABLE.
    --
    Vintage computer games and RPG books available. Email me if you're interested.
  4. Re:But SyBase? by Christopher+B.+Brown · · Score: 2
    I'm not sure I'd go along with standard non-mainframe DBMS; Oracle seems to fit that bill a bit more closely. I see Oracle used a lot more...

    But you are indeed right that page-level locking can be made to work with a sound design when architected by someone that knows how to cope with this.

    I'd expect it to work out best if updates are performed via a TP monitor (like Tuxedo) or a message queueing system (ala MQSeries); if updates are grouped together so they are done by a central "update process," then the number of users involved becomes less relevant.

    The problem is that page locking mandates having "highly-qualified Sybase experts;" it tends to be easier to keep in stock "somewhat qualified Oracle folk," which means that the assumption of "perpetually good design" is not safe...

    --
    If you're not part of the solution, you're part of the precipitate.
  5. Re:Hmmm this sounds exciting by Jason+Earl · · Score: 2

    MySQL is the perfect datastore for a mostly read database that needs to be fast, and doesn't need the ACID properties of a real database. If this describes your application then MySQL is probably the best solution for the job.

    I find it a little disturbing that MySQL feels the need to change their database so that it becomes something that it is not. When they are done they almost certainly will be left with something slower than they have now for their current target audience, and it probably won't be as fast as PostgreSQL or Interbase for their new target audience.

  6. Re:MySQL != DB by tuffy · · Score: 4

    MySQL is called a database because people are stupid. My /etc/passwd file is a database. My comma-delimited file of CDs is a database. MySQL is a database management system. Whether or not it's relational is for the pedants to bicker about.

    --

    Ita erat quando hic adveni.

  7. Re:The real reason for this... by latemus · · Score: 2

    I would recommend Interbase over MySQL for just about any application. There is a very active community working on it. They forked the code because Borland/Inprise's apparent lack of real commitment to Interbase. They call it now Firebird. For more Informatin, look here.

  8. Enough already by deasmi · · Score: 5

    Why is it that MySQL receives so much converage for adding 'features' that most/all other DBMSs take for granted.

    It's not even releational yet, supports the references keywork, does nothing. Recently found a MySQL database with duplicate primary keys in a table ???!!

    If you need and OpenSource RDBMS PostgreSQL ( Also Open Source ) has had most if not all the important features for years. Yes it may be slightly slower, but it won't corrupt your data randomly, you don't need to take it offline to backup and it supports a proper set of SQL.

    1. Re:Enough already by DrWiggy · · Score: 3

      There's no pleasing some people. Whenever a story in the past has come up about MySQL, the PostgreSQL kiddies run around like headless chickens, screaming about the lack of integrity and row-level locking, lack of transactional support, etc.

      Then, a story is posted saying how MySQL will address these issues in the next 6 months, and all of a sudden the same people start running around screaming at us to shut up, and why bother in the first place, because putting such functionality in is a stupid idea anyway.

      Plain and simple, MySQL is faster and has multi-user (at the DBA level) support. It means different applications only get access to the SQL tables they need. It means you can give users their own databases easily. It's incredibly fast. All it lacks is a little transactional auditability and data integrity - for most applications run out here on the net, this isn't an issue, and if it is, you can normally work your way around it.

      Now, MySQL is going to get the features that will make it fit snugly into the low-end RDBMS range of open source DBs, and we're going to be happy, because it means our data is going to be safe. We're even prepared to happily take a hefty performance hit if need be.

      Unfortunately though, people seem to take this matter as seriosuly as their religion, and we end up with this sort of argument. This is all seeded from either jealousy, bigotry, or both. The argument as to which DB is best is one for you to decide all by yourself.

      However, when I saw this story, a smile appeared on my face, because it's the one thing, and the only thing, that I actually wanted MySQL to incorporate at some point. Sure, the model and philosophy sounds a bit kludgey but I don't care because as long as it works, I'll be happy. :-)

    2. Re:Enough already by f5426 · · Score: 2

      > Why is it that MySQL receives so much converage for adding 'features' that most/all other DBMSs take for granted

      Because slashdot is built upon MySQL. Slashdot editors post stuff that interest them. MySQL is obviuously and rightfully one of those topics.

      Cheers,

      --fred

      --

      1 reply beneath your current threshold.

  9. But SyBase? by YuppieScum · · Score: 4


    and it seems to me that this should be something 'standard' with any DB that is expected to handle non-trival amounts of data.

    Sybase has been the "standard" non-mainframe database in the financial world for many years, storing non-trivial volumes of data, and only in it's most recent version (11.9.2) has it had row-level locking.

    In fact, row-level locking is a requirement driven more by the number of users, size of each row, size of pages, and the frequency and speed with which any given row will be updated.

    Where users=>many, rowsize=>small, pagesize=>large, and update frequency/volume=>high, then row rather than page locking is required to keep performance high - otherwise processes get blocked waiting for a page to be released.

    Where the above are not met, then page-level locking is fine - as long as your design is sound. Row level locking is not a substitute for a good design.

    --
    This sig left unintentionally blank.
    1. Re:But SyBase? by hugg · · Score: 2

      It's been awhile, but I don't think MySQL even has page-level locking .. it has *table*-level locking. This means that you get many readers or one writer on a table at any given time. Someone correct me if I'm wrong, but I believe that's the sad truth.

    2. Re:But SyBase? by Tower · · Score: 2

      >"You transaction have be choosen as the victim of a deadlock"

      Sounds like the instructions on those assemble-it-all-yourself kits from K-Mart...

      "Please be happy to waiting for most honorable deadlock to join the ancestors." ?


      --

      --
      "It's tough to be bilingual when you get hit in the head."
    3. Re:But SyBase? by Tassach · · Score: 2
      The financial market is the one area where Sybase has a market share lead over Oracle. In most other sectors, Oracle does have a larger user base.

      I would submit that ANY non-trivial RDBMS requires a highly-qualified expert-level DBA/Database Designer. Personally, I feel that Sybase is much more administrator friendly than Oracle. A "somewhat-qualified" Sybase DBA is less likely to hose the system than a "somewhat-qualified" Oracle DBA would be. A database designer has to take the idosyncracities of his target database into account when designing the schema -- this is true regardless of the RDBMS platform he is targeting. Unfortunatly, good database designers are a rare breed. It dosn't seem to be a subject which gets much attention in CS programs at the undergraduate level.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  10. Re:Hmmm this sounds exciting by Nicolas+MONNET · · Score: 2
    I do, but I've honestly never seen it happen. I've been using Oracle for a couple of month and I already had a major corruption problem.

    --

  11. MySQL Isn't A Heavyweight Database System by rabtech · · Score: 2

    If you need a super-heavyweight database system, go with Oracle, or MS SQL. (The latter will never happen, no matter how good SQL Server is because /. will never admit Microsoft may have a good product)

    Both are excellent database systems that support many more advanced features than just row-level locking, such as real-time English Natural Language Query systems.

    Remember: You get what you pay for. Don't use a free database system then compain when it doesn't scale as well as the big boys


    On a side note, IMHO the Dynamic locking on SQL Server works really well -- automatically adjusts to table, page, and row-level locking on the fly.


    -----

    --
    Natural != (nontoxic || beneficial)
  12. Re:MySQL is a DB by ZanshinWedge · · Score: 2

    MySQL IS a database, and a pretty damn good one at that. However, it is not a very sophisticated database. At one time, actually not THAT long ago, MySQL level databases were state of the art. Now, of course, the state of the art has been bumped up quite substantially. MySQL is still an excellent choice for many database needs, but obviously not all of them, especially in the "high end". Not everyone needs a Lamborghini that pumps out 450 horsepower, sometimes a VW bug works just fine, that's what MySQL is.

  13. wow by kaisyain · · Score: 3

    A Press Release about vaporware due out sometime in the next six months submitted anonymously.

    I can see why this is news.

  14. MySQL != DB by Anonymous Coward · · Score: 2

    Until it supports transactions & row-level locking, why is MySQL called a database?

    1. Re:MySQL != DB by Speare · · Score: 2

      And Excel is called a spreadsheet, even though it really is an application that lets a user edit a spreadsheet. What's your point?

      People mix and match levels of metaphor all the time. Sometimes, a tool and its function ARE the same thing (Hand me that level, I don't think this table is level).

      If your mother wants to use the Internet because "it's included in her iMac," what's the point in correcting that level of semantics?

      --
      [ .sig file not found ]
    2. Re:MySQL != DB by ichimunki · · Score: 2

      Those are nice features for a database to have, but they are not necessary to join the database club. Can we save the semantic arguments for something important? I mean, if this isn't a database, what would you like us to call it?

      Note: I do not use MySQL, I use postgreSQL. Of course, I frequently use Perl to interface with it, and that's not really a programming language, so what do I know, huh?

      --
      I do not have a signature
    3. Re:MySQL != DB by GypC · · Score: 2

      My bad... I was under the impression somehow that it was Public Domain, but I guess it's not.

      "Free your mind and your ass will follow"

    4. Re:MySQL != DB by GypC · · Score: 2

      PostgreSQL is public domain... and it is actually a real RDBMS!

      "Free your mind and your ass will follow"

  15. Re:MySQL *IS* a Database by CorporateProgrammerD · · Score: 2
    True. Stored procedures and/or triggers are not required to store/retrieve data. They're not even required to meet the requirements of ACID.

    But they can be rather useful tools. They can facilitate information hiding, and provide an object-like (keeping some behavior with the data) feel to the application. They can also make management of multiple systems and applications somewhat easier.

    Let's say your company decides that the USPS just isn't good enough. The new policy is that all US customers get their shipments via UPS or FedEX. Suddenly all those "PO Box" addresses in the database are no longer valid.

    So what do you do? Do you rewrite that legacy order entry application used by division X? As well as the new order entry app used by the rest of the company? (And let's not get into why division X can't use the new app, it's not under your control. Life is unfair. Other people get their way sometime, even if they're idiots. Just deal with it.) What about the new Web interface that the Consumer Technologies department has just released? Let's not forget the software that the sales department uses to give price quotes. And the Customer Service app. How many developers will that take? How long will it take to roll out after QA approves all of the changes? How many desktops, laptops, and servers are affected?

    Personally, I'd just rather change one trigger or stored procedure on one or two servers. OK, so the QA people still have to test all of those different apps, but they'd have to anyway. This is still the easiest way to get it done.

    Can stored procs and triggers affect performance? Yes. Especially poorly written triggers.

    Can stored procs make it more difficult to migrate to another database? Yes, while making it easier to migrate the UI portion of the app to other platforms.

    It's a tradeoff. Often it makes more sense to put some (all?) of the business/application logic into the database. It doesn't always make sense. That's a design decision. While designing a system, I'd rather have more tools at my disposal, and pick the best combination, rather than having my hands tied.

    --
    To email, do the obvious.
  16. Re:Hmmm this sounds exciting by Cato · · Score: 2

    And make sure you do logical exports if possible, not just physical backups - it's a lot easier to spot and fix messed up data in a flat file.

  17. Re:Sounds like it is about time by GypC · · Score: 2

    you get what you pay for

    Oh really?

    "Free your mind and your ass will follow"

  18. Why wait for the next version? by brianvan · · Score: 3

    Just pony up the dough for Oracle in the first place, ya cheap fux0rs.

    Or, if you need something quick and dirty, go with the quickest and dirtiest of them all: Access. (that is, if you have a Windows box available)

    I'm being serious. MySQL has it's good uses, but if there's severe limitations in its use, why wait for it to get better? (if it will at all) I don't believe that the announcement is vaporware, but there's more problems with MySQL for serious usage than row-level locking. If you're not happy with it right now, I can point you to a handful of solutions that will fit your needs one way or another.

    And if you are happy with it right now... well, then nevermind, have a nice day.

    1. Re:Why wait for the next version? by brianvan · · Score: 2

      I know Access sucks a lot... I would never use it to power a website...

      I'd use it as a development tool, though. It takes bona fide SQL queries, and it is a database, so you can build some stuff around that and then just use another database as the real live thing.

      MySQL + PHP is great for websites. But then again, if that's true, obviously everyone's learned to live without transactions and row-level locking, eh? And if you need something more powerful than the current MySQL... well then you might as well step up to Oracle at that point anyway, rather than wait for a better MySQL...

  19. Re:Why don't they strip down PostgreSQL instead ? by Frank+Sullivan · · Score: 2

    PostGreSQL only allows *one* database per server, and doesn't have good inter-server communication. When asked about this, the PostGreSQL developer community responds that we should all just put everything in one big database, rather than splitting our databases up along functional lines and doing cross-database queries when needed. This goes against the way those of us raised on Sybase and other commercial databases were trained - and against good data modelling, imho.

    That is the #1 gripe we have against PostGreSQL, and one of the main reasons we're using MySQL instead. While feature-rich, the design of the engine interferes with what we understand as good data model architecture.

    The gripes against MySQL are missing features - better locking, transactions, stored procedures, and triggers. We learn to cope with them. And PostGreSQL doesn't offer stored procs at all, and requires triggers to be written in C - ugly, ugly, ugly. It ain't that much better, and in some ways it's worse.

    --

    --
    Hand me that airplane glue and I'll tell you another story.
  20. "NuSphere, a Progress Software Company" by Earlybird · · Score: 2

    Does anybody else here find it horribly fascinating that Progress -- creators of Progress (a high-end, commercial RDBMS), WebSpeed and SonicMQ -- is expending time, effort and money in developing and marketing MySQL, a rival RDBMS?

  21. Re:MySQL *IS* a Database by SuiteSisterMary · · Score: 2

    Yup, the other way to do it is through middleware, generally objects. But at that point, your apps never touch the database anyway. And very rarely will you have seperate database backends that are running on different databases. In my experience, at least.

    --
    Vintage computer games and RPG books available. Email me if you're interested.
  22. Re:Why don't they strip down PostgreSQL instead ? by dentldir · · Score: 2

    I believe your information here is out of date. PostgreSQL offers stored procedures using pgpl/sql and handles multiple databases per server just fine. I'm not sure about cross database queries as I haven't tried any.

    If you haven't looked, PostgreSQL 7.0.2 is worth a look if the last version your worked with was 6.x.

  23. Why don't they strip down PostgreSQL instead ? by f5426 · · Score: 5

    (Go on. Moderate this as flamebait. It is probably one)

    I never understood why people have to re-invent the wheel every time.

    Linux is slowly re-implementing what FreeBSD already have, (vm, or kqueue), and now MySQL is trying to turn itself into a real DB, althought it doesn't have the the foundations for this.

    If someone (ie slashdot) have a problem with the absence of row-locking, then he shouldn't use MySQL at the first place. Maybe it is just me, but I would be more enthousiast to a 'optimise PostgreSQL' then to a 'compexify MySQL'. Probably because premature optimisation is the root of all evils.

    Or maybe because the concept of a non-ACID (basic ? :-) ) database make me barf...

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.

    1. Re:Why don't they strip down PostgreSQL instead ? by maraist · · Score: 2


      And PostGreSQL doesn't offer stored procs at all, and requires triggers to be written in C - ugly, ugly, ugly


      You can write them in TCL, Perl, SQL, PSQL, .... You just have to install the proper interpreter and bind the language..

      Granted, non-C stored-procedure support is very limited (compared to Sybase or Oracle).

      As other posted, a "server" can maintain multiple DB connections, though to my knowledge it is still impossible to perform inter-DB selections.. I don't think that Mysql can do this though, so the point it moot.

      -Michael

      --
      -Michael
    2. Re:Why don't they strip down PostgreSQL instead ? by maraist · · Score: 2

      I never understood why people have to re-invent the wheel every time...

      Maybe it is just me, but I would be more enthousiast to a 'optimise PostgreSQL' then to a 'compexify MySQL'.


      It's like saying, why bother with XML when we have relational database at our disposal.. Not all solutions fit all problems. For some people, a simple hash-table lookup is all that's needed (berkly hashes, for example). For others, a simplied data comparator is needed, e.g. MySql. For others, data-integrity is needed, i.e. Postgres or commercial apps.

      Mysql has speed as a stated goal.. They've hinted that they might implement Foreign keys soon, but ONLY as an option that can be implemented in such a way that it does not hinder performance one iota (see goal number 1).

      It's not reinventing the wheel.. It's learning that not all wheels fit all vehicles (see bicycle verses formula-one racer).

      I'm not sure about all the stated goals of PostgreSQL, but it seems to have, as it's goal to be a top performer with standards compliance - To be an all around champ. It can't win on all fronts / you have to make design choices. Postgres opted for version controlling rows instead of row-locking, it opted for one process per client instead of multi-threading, it opted for one file per meta data-entity, etc.

      I use to use Mysql until my work expressed concerns for Data-Integrity. Now we use a mix of Oracle and Postgres (depending on the target app). The inability to perform several basic standards-based SQL operations in Mysql was very daunting. Roll-back was a critical issue, for example.

      But, if I were a small-time ISP selling PHP and DB services, I'd go for Mysql.. Less overhead for me in terms of memory and CPU cycles.

      In the Mysql documentation, it says that you can "learn" to work around the limitations of Mysql. Meaning that there are successful programming practices. Such is the case with Slashcode I'm sure. But from a business standpoint, it's difficult to justify the use of limiting technology, when there are other alternatives..

      Performance-wise, Mysql has little overhead, and a small incremental cost, where-as Postgres has a decent amount of overhead and a moderate incremental cost. You'd think Mysql would come out on top, but Benchmarks [an old slashdot post] suggest that Mysql is unstable beyond a certain load level. Beyond that, if you use table locking, then you do not scale at all. Row-locking is slow for the big guys like Sybase (which I know much about). You take a hit on EVERY access just so that you can claim that you have regional locking, which facilitates concurrent access. Postgres side-stepped the issue (beit it for good or bad) through version-based rows, so they get to have a closer-to-linear performance curve.
      --
      -Michael
  24. Why not.. by vr · · Score: 2

    Why not use a real RDBMS like Borland InterBase. </flamebait>

    .. and yes; it is opensource.. :)

    1. Re:Why not.. by vr · · Score: 2

      It is still better than MySQL, and it can actually handle large quantities of data pretty good.

      If MySQL doesn't fit your needs, don't use it.

  25. Why lock a row when you can use a transaction? by TurboRoot · · Score: 4

    I use PostgreSQL myself, and I never have to lock rows, its done automaticly for me by transactions. Mysql team has stated many times adding things like this requires almost a complete re-write of the database to make it work. It works well in PostgreSQL because rows are never deleted. They are appended when updated, and the old rows are still available. When no clients are connected that are using the old rows in a current transaction, it deletes the old rows the next time it finds it. Pretty simple, and it works fast. I am not another lamer saying, hay use PostgreSQL its cool. I am saying, it works. Derk

  26. MS SQL by TheInternet · · Score: 2

    If you need a super-heavyweight database system, go with Oracle, or MS SQL. (The latter will never happen, no matter how good SQL Server is because /. will never admit Microsoft may have a good product)

    MS SQL may or may not be a good database (it must be better than Access, right? :), but it only runs on NT/W2K, and that's a deal breaker for me.

    - Scott

    ------
    Scott Stevenson

    --
    Scott Stevenson
    Tree House Ideas
  27. MySQL IS a database by jackmc · · Score: 2
    So what if it doesn't support transactions? It is faster because it doesn't. IMHO, a good programmer should be able to program with or without transactions. In most cases where one needs transactions, it isn't too difficult to write the code around it, and often have it work better than transaction based code (especially with MyISAM table, which don't have the transaction capability slowing them down).

    Again IMHO, transactions are a crutch. At times, they are a useful crutch, but a crutch nonetheless. There is an excellent chapter (appendix?) in the MySQL manual discussing the absence of transactions and some of the workarounds.

    Row locking is a whole 'nother issue. While you can implement row-locking with atomic SQL statements, it is more efficient for the DBM to do this. Besides, locks need to go away when the connection goes away, which manual locks do not. MySQL could fix this by allowing a connection to provide a query or queries that the server should always execute when the connection is closed, so that if something disrupts the connection, manual locks can be removed...

  28. SHOW ME THE CODE by Snowfox · · Score: 2

    Can we please not give notice/publicity to announcement-of-intent from companies? Show code, then collect your kudos and marketroid credits.

    Unchecked, this could turn into a constant shower of press releases from hundreds of companies wanting a piece of the Linux pie. And when the majority amount to nothing, as most of these seem to, it just makes Linux look bad.

  29. Re:The real reason for this... by tweek · · Score: 2

    I've just started messing about with Interbase a bit and I find it to be extremely nice. I'm not a database geek by any means but Interbase provided somethings that I'm used to from my previous Oracle experience. Basically this boils down to what different people THINK a database should or should not have. MySQL leaves most things (like FK's, triggers, etc) to allow for greater speed.

    --
    "Fighting the underpants gnomes since 1998!" "Bruce Schneier knows the state of schroedinger's cat"
  30. Row locking is already implemented - here's how: by Anonymous Coward · · Score: 3
    As a mather of fact, it's very easy to implement row-level locking using any database engine that support unique-key indexes.

    To do that, just create a new table called "locks" with 2 fields:

    resource_name: char[80]
    user_name: char[20]

    and create a unique index on resource_name.

    In order to perform a lock on a specific resource, like a table row, you just have to do this:

    insert into locks values( "TABLENAME:ROWID", "USERID" );

    Where TABLENAME is the name of the table and ROWNUNBER is the number/ID of the row you wish to lock.

    If this resource wasn't locked yet, then a new row will be inserted in the locks table.
    However, if this resource was already locked, then it would create a duplicate entry in the resource_name column that would violate the unique index.
    This way, the unique index would stop INSERT from inserting this line into the locks table.

    You can create a very simple lock( table, rowid ) using this insert, that would return true if INSERT worked OK and false when INSERT fails.

    To unlock a resource, you just have to remove the respective row from the locks table.

    delete from locks where resource_name="TABLE:ROWID";

    The user_name field can be used to clean all locks that were active when a user connection drops.

    delete from locks WHERE user_name="USER";

    This works becuase insert will check for duplicates in unique indexes in an atomic operation.

    You simply cannot have two persons inserting the same lock in the locks table, because insert is ATOMIC.

    fjp_at_linuxstart.com

  31. Re:Hmmm this sounds exciting by Nicolas+MONNET · · Score: 2
    I know you mean this as a flame, but as far as *code* stability is concerned (not talking about database stability -- which would require transaction to have any kind of meaning), I've never ever seen MySQL crash on me in like 4 years of using it ... quite impressive.

    Most ascii file schemes end up eating some shit usually. And Access ... BURP.

    --

  32. Re:Hmmm this sounds exciting by Delphis · · Score: 2

    Why do people have this need to criticize it?

    I have no idea and it bugs me too that the /. 'groupthink' is 'sucks to MySQL' .. assholes. Many people (myself included) like it for its simplicity and outright SPEED. If you want to have some dynamic content on a site - I'm not talking a full-blown e-commerce site, just some small stuff like .. OH, a discussion forum perhaps?? - then MySQL is great for the task.

    If you don't want to use it, noone is forcing you people.
    --

    --
    Delphis
  33. Re:Um, where have you been? by Paradise_Pete · · Score: 2
    Lets all say it together: O-P-E-N--S-O-U-R-C-E.

    Wait! I wasn't ready.
    Dang, I'm always missing out.

    Pete

  34. Re:Sounds like it is about time by f5426 · · Score: 2

    > Here's my guesswork:

    Here is mine:

    MySQL have been designed to be lightweight and fast for non-critical applications.

    Users of MySQL have happilly fit this definition, but now, more and more of them are going higher profile. Instead of migrating to a more adequate tool, they want to migrate the tool itself. IMHO, a bad idea.

    Locking is definitely not a trivial subject. I doubt that it can/should be implemented as an afterthought.

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.

  35. The real reason for this... by Maddog_Delphi97 · · Score: 2

    Is because Borland has open-sourced parts of the Interbase engine...

    Speaking of which, has anyone test-driven the open-source version of Interbase (In either the Windows or the Linux)? How good is the source code?

  36. Slashdot always freezes because of one piddly post by AFCArchvile · · Score: 4
    It's how I know that someone's posting a reply to one of my posts: if it takes longer than 2 seconds to navigate to my users.pl, then someone's probably replying.

    Of course, there's Bender: promises, promises. However, Bender still puts random spaces into long A HREF tags, so I can't refer to long URLs like Boston Globe pages. For such a good discussion site, Slashdot has some bad code issues.

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  37. Re:Pony up for Oracle by Malcontent · · Score: 2

    Two year per mhz licenses are pretty damned cheap especially when considered against ms-sql. With ms-sql you'd have to upgrade every two years anyways as MS does not support older software. OTOH why pay at all? Postgres, interbase, and sapdb are all open sourced.

    --

    War is necrophilia.

  38. Re:MySQL *IS* a Database by Malcontent · · Score: 2

    It's not a relational database unless it enforces referential integrity. MySql is not a relational database.

    --

    War is necrophilia.

  39. Re:This is good by Stephen+Samuel · · Score: 2
    ...everyone knows, you get what you pay for.

    Yeah, right. tell that to MS. I think that we can be clear that what you (don't) pay for a product is not necessarily related to the value/power of the product.

    You don't get what you pay for, you get what you choose, then you pay for your choice.

    mySQL is not (currently) being touted as a real alternative to Oracle for large databases. It has it's uses, and that's not one of them.
    `ø,,ø`ø,,ø!

    --
    Free Software: Like love, it grows best when given away.
  40. Why lock at all? by Dion · · Score: 2

    Why lock AT ALL when you can use InterBase?

    Interbase doesn't lock anything, it simply makes a new version of the row that becomes the current when the transaction is comitted.

    MySQL is, IMHO, a piece of crud compared to ANY real DBMS, as it doesn't have any of the features that are needed in a database (like foreign key constraints or transactions)

    That said, if you don't compare MySQL to flat files it does come out on top, it's pretty neat as a structured storage, but it sucks so badly when you have more than one table that needs to be in a consistent state.

    InterBase is *VERY* nice and pretty fast, but it has rusted quite a bit from v4 to v6 and it's DBD was completely useless until quite resently, after lots of hacking it rarely deadlocks now, but it (IB) is quickly on it's way out of our setup.

    For a REAL database that scales the pants off anything that is Free software today (it can support SAP R/3 with it's 16000 tables) check out SAPDB:
    http://www.sap-ag.de/solutions/technology/sapdb/ index.htm

    I's set to come out under GPL(!) in April next year, but I've been using it for a while now and it seems to be a *really* nice DBMS.

    --
    -- To dream a dream is grand, but to live it is divine. -- Leto ][
  41. Re:Row locking is already implemented - here's how by SuiteSisterMary · · Score: 4

    You are aware that due to the way MySQL works, while a record is being inserted/updated, no other record in that table can be touched, yes? This is a programmed behaviour. It's not that it can't do row locking so much as it DOES do full table locking, and naught else.

    --
    Vintage computer games and RPG books available. Email me if you're interested.
  42. Re:MySQL *IS* a Database by SuiteSisterMary · · Score: 2
    Replication, transactions, row-level locking, stored procedures and triggers are NOT requirements of a database.
    Correct. Some of them are requirements of being considered a Relational Database Management System. Others are just nice to have.
    --
    Vintage computer games and RPG books available. Email me if you're interested.
  43. Re:MySQL *IS* a Database by SuiteSisterMary · · Score: 2
    Application code should be kept in the application, not the data store (which is what a database is).
    Not exactly. It's a good idea to have all sorts of business logic in the database backend, to present transparancy in the front end. If all data going into column X need to have 5 added, it's better to do it at the database side than the app side.
    --
    Vintage computer games and RPG books available. Email me if you're interested.
  44. Re:Sounds like it is about time by Skater · · Score: 3

    Well, if you read the MySQL home page, they clearly state that they created a database for their own use. Apparently, they didn't need the feature.

    Not everyone needs a total heavyweight database system. Since I'm the only one accessing my databases, I didn't even realize it didn't do row-level locking.

    Everyone is so harsh toward people who write a product and release it for free...I'm just glad these tools are available because it allows me to experiment and learn without spending thousands of dollars for hardware and software.

    --RJ

  45. Grammar Police by baxissimo · · Score: 2
    Anyone who's used MySQL for anything with more then a few hundred thousand records ... when your whole DB freezes because of one piddley write, its more then just a little annoying.

    I can deal with slashdot repeating the same story a few times, but when CmdrTaco repeatedly abuses the English language, it's more than just a little annoying. :-P

  46. Re:Sounds like it is about time by MartinG · · Score: 3

    > Any ideas on why it took so long to add this?

    Here's my guesswork:

    Probably until recently, the average MySQL user hasn't taken it seriously enough to rely on it for large amounts of data, so it was unneccesary or perhaps even undesirable - row level locking is _slower_ to a point for small data sets.

    More recently though, I expect more people are starting to use MySQL "seriously" as it matures, storing much more data and suddenly the need for row locking shows itself more clearly.

    It will still be slower for very small data sets, but thats a small price to pay for the scalability benefits row locking brings.

    --
    -- MartinG To mail me: echo kewyjlcxyzvjfxbqwh | tr bcefhjklqvwxyz .@adgimnoprstu
  47. fractured IP addressing scheme by Bob+Abooey · · Score: 3

    The real problem lies within the addressing scheme that the C language uses. As we all know MySQL is written in C, which is the proper language. However C doesn't really have arrat's they are laid out in a linear manner in the heap of your program. So we need to be able to do pointer arithmaic when we access a row in the database. Yes, this is ultra fast, but the dangers are great. Say for example I have a mutex on J in the following schema: data [j][k], then it is vital for me to lock that row with a simple ((j * data) * k * sizeof(data)). Pretty simple no, but the problem is that you cannot lock a pointer. I think they will have to re-write MySQL in java to fix the problem.

    --

    All the best,
    --Bob

  48. SAP isn't a database.. by Pengo · · Score: 2


    It's a application built on top of a database. and 1600000 tables is hardly a fair comparison. You can have 10,000 tables in mysql and not have a problem.

    SAP runs great w/MS SQL Server or Oracle.




    --------------------

  49. I know I could use by iiiFEAR!!! · · Score: 2

    some low level rocking.

    --
    "First rule of government spending: Why build one when you can build two at twice the price?" -- Mr. Haddon, Contact
  50. how does PostgreSQL compare to Firebird? by Tumbleweed · · Score: 2


    Anyone got any experience with both they'd like to share?

    How do they compare with MySQL w/ Berkeley DB tables?