Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

•Re: Convert script to use MySQL

by merlyn (Sage)
on Nov 26, 2004 at 21:27 UTC ( [id://410643]=note: print w/replies, xml ) Need Help??


in reply to Convert script to use MySQL

The real question for me is why MySQL, and not something more complete, like PostgreSQL? Are you not aware of PostgreSQL? Is it not installed on your system?

MySQL had its day. Now it's being left in the dust by PostgreSQL. There's no reason in my mind to continue to use MySQL except for legacy (software or people).

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


Update: Take a look at the bullet list at the end of http://advocacy.postgresql.org/advantages/ if you're not sure why I'm saying what I'm saying. Most of what you see there is not mature (if available at all) in MySQL. But the most particularly troublesome part of MySQL is the licensing. Once you are making money with MySQL somehow, you're almost certainly in the "commercial" category, and will have to pay hefty fees to "license" the non-personal version. PostgreSQL is BSD-style licensed, and is therefore truly free, to embed or adapt as you see fit.

Replies are listed 'Best First'.
Re^2: Convert script to use MySQL
by dws (Chancellor) on Nov 26, 2004 at 21:59 UTC

    There's no reason in my mind to continue to use MySQL except for legacy (software or people).

    How about performance?

    I'm working with a system that essentially does OLAP with a lot of updates. PostgreSQL (7.3.4) works great for it in theory, but in practice the system bogs down over a relatively short period of time (a few hours), and way down over the course of a day. We have to stop and vacuum the database nightly. A vaguely similar system I've worked on that uses MySQL (4.0.something with InnoDB tables) didn't suffer the same degradation.

      I've seen the same thing. I understand Postgres has addressed this issue in current versions but the version I was just doing contract work with (a year old I think) had memory leaks that meant it had to be restarted just about daily b/c the performance would spiral down to almost nothing. The MySQL I was working with 3 years ago had no trouble driving up to 10 million page views a day of data from a couple dozen different tables and I didn't admin it but I don't recall it needed restarting often if ever.

Re: •Re: Convert script to use MySQL
by ikegami (Patriarch) on Nov 26, 2004 at 21:54 UTC
    Could you provide some documentation on differences between the two for us still in the (apparent) Dark Ages of MySQL?
Re^2: Convert script to use MySQL
by jdtoronto (Prior) on Nov 27, 2004 at 05:10 UTC
    Assuming always that PostgreSQL is available on your OS. Assuming that as the OP is talking about CGI that his hosting service supports it, or even allows it!

    Speaking personally, I have tried three implementations of PostgreSQL on Windows. Using cygwin is a performance nightmare. The two other commercial products - both based on pretty old (like 7.2.1) PostgreSQL - are expensive (about double the price of commercially licensed MySQL) and are not yet really suitable for end-user application.

    When PostgreSQL finally has native Windows support then it will be interesting. But until then it is nice to have on a *nix box, but not much use in my day to day real world. I am sure that one day it will be able to compete - but they have a little way to go yet.

    jdtoronto

      http://www.postgresql.org/docs/faqs/FAQ.html#1.4

      1.4) What non-Unix ports are available? Starting with version 8.0, PostgreSQL now runs natively on Microsoft Windows NT-based operating systems like Win2000, WinXP, and Win2003. A prepackaged installer is available at http://pgfoundry.org/projects/ +pginstaller. MSDOS-based versions of Windows (Win95, Win98, WinMe) can run PostgreSQL using Cygwin.

       

        But what about DBD::Pg? Last I checked (a month or two ago), it would not compile or install on Windows with the native windows port of PostgreSQL, it would only install using the cygwin port.
        Starting with version 8.0, PostgreSQL now runs natively on Microsoft Windows NT-based operating systems like Win2000, WinXP, and Win2003. A prepackaged installer is available at http://pgfoundry.org/projects/ +pginstaller.
        Yep, my point entirely. Am I going to put a beta release into a production environment? Nope! Am I going to put the first release inbto a production environment? Nope!

        Sure PostgreSQL is, for the first time, on our radar screens, and when it is truly production ready on Windows we will evaluate it there. It is nice on *nix, and we have ported a few things here to use it for evaluation purposes. But that is far as we can risk going right now in a princiaplly Windows shop.

        jdtoronto

Re^2: Convert script to use MySQL
by bradcathey (Prior) on Nov 26, 2004 at 21:47 UTC

    merlyn, you're kidding, right? Does MySQL AB know about this?


    —Brad
    "Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton
Re^2: Convert script to use MySQL
by Anonymous Monk on Nov 26, 2004 at 22:26 UTC
    Score -1: Flamebait, heh :)

    Anyway, why not keep using the flatfile? If it is a read-only small data store, just keep using that, with proper file locks. Or maybe use a BerkeleyDB tied hash. I'm sure there are other options to look at as well...

    Again, I don't know exactly what the requirements are, but what I am pointing out is that an SQL engine can be overkill sometimes.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://410643]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-24 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found