+ Reply to Thread
Results 1 to 10 of 10

Thread: MySQL vs PostgreSQL

  1. #1
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    MySQL vs PostgreSQL

    I think a lot of users aren't familiar with Postgres, which is why I see a lack of use. -- That and turnkey web solutions seem to default to the PHP/MySQL combination, which users don't know or want to modify.

    While I can't do anything about #2 for those that don't know much about editing their applications, I can address the unfamiliarity.

    There are three good sites I think people might be interested in:
    » Pro PostgreSQL over MySQL
    » Wiki - MySQL vs PostgreSQL
    » Benchmark comparison of MySQL vs PostgreSQL


    Obviously, because the first link is a site that is for PostgreSQL, you may think that it'd be a little bias about PostgreSQL's capabilities over MySQL's; however, after reading the article, I can't say that for sure. It addresses both MySQL's and PostgreSQL's benefits over one another. The truest statement was probably in saying: "Benchmarks are very difficult to do well; creating truly comparable benchmarks is a complex art." They also address that the only true benchmarks is to have both databases optimized and tuned. Regardless, the better the hardware you throw at the matter, the better PostgreSQL results, unlike MySQL which doesn't scale nicely.

    The Wiki is a little less biased and even still, seems to proclaim Postgres as being the better option. The third link was actually taken from the Wiki page, I just wanted to make sure people saw this. One thing to pay attention to is the numbers on the graph, even though MySQL seems to degrade over connections, it seems like the numbers are still higher than Postgres's -- I didn't read the 3rd article fully for lack of time.

    Final thought: Old tests showed that MySQL was the faster database, but since then users noticed that Postgres had pessimistic configurations and when optimized it performed better (the latest versions of PgSQL is a little more optimistic). Additionally, the data integrity of Postgres is much better due to the preprocessing, unlike MySQL where data problems do exist.


    Hope this helps,
    vol7ron :Þ


    Ü




    Edit:
    I suppose either no one cares, or no one is reading or thinks anything about the links.

    What it comes down to is Pg is faster, more reliable, more feature rich, and open sourced with regular updates and new features.

    All-in-all, even if you use MySQL predominantly, I'm hoping to spark some interest for users to start playing around with Postgres and stored procedures. If x10 installs the newest version, 8.3, then you will be happy to see Full Text Search capabilities installed with it.
    Last edited by vol7ron; 03-11-2009 at 06:03 PM. Reason: Automerged Doublepost
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  2. #2
    port5900's Avatar
    port5900 is offline x10 Sophmore port5900 is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    NYC BrOokLyn!
    Posts
    150

    Re: MySQL vs PostgreSQL

    I was looking at PostgreSQL just for the hell of using and learning to use it. It does not seem to be such a huge switch from mySOL to PostgreSQL. But the 1 problem and onlymproblem I had was,..... no web host I used supported PostgreSQL. and thanks for the documentation, i did read it.
    Last edited by port5900; 03-12-2009 at 01:26 AM.

  3. #3
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: MySQL vs PostgreSQL

    Quote Originally Posted by port5900 View Post
    ...no web host I used supported PostgreSQL
    That is what drove me to x10, because I, like you, could not find one. Now I've found several, but I've grown fond of the owner and the support staff here, so how could I leave?

    Part of the reason I posted some of those links is because I've read a lot of comparisons between the two, but the comparisons were between like Pg 7 and I think a beta version of MySQL 4.x or something.

    Regardless, both have come a long way. But in my opinion, MySQL is more of an MS Access type of database, while Postgres is more of a SQL Server. There is this free software from ESM called SQL Mgmt Studio Lite (the Lite means less features and free), but it still is great and reminds me of using Oracle again. I was even able to produce the SQL for my tables again, once I had them constructed (called: reverse-engineering).

    I came from a MS world, using Oracle and coding C++ and then the .NETs, and then I was forced to use Linux and Perl at work. At first I dreaded it, but once I realized I started using Firefox more than IE, I was hooked. Perl became my primary web language and Pg my favored free database, not because I use them now (cuz the tools to use the others are there), but because they actually are more beneficial and I was just oblivious to that before.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  4. #4
    hezuo's Avatar
    hezuo is offline x10 Sophmore hezuo is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Huascar, Santa Anita
    Posts
    174

    Re: MySQL vs PostgreSQL

    Thanks a lot for sharing. I'm a newbie and this kind of discussion always help me find out more about what bd engine i should use. I've always been told that PgSQL is better, but i have no idea the difference depends on so many factors. Thanks for the share!

  5. #5
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: MySQL vs PostgreSQL

    Not a problem. We here don't have much control over the database configurations themselves, but there are so many settings to tweak (kind of like a computer) to speed it up if we did. Most of them involve how big the storage size is for memory calls. You don't need a big block size if your database is all small integers.

    Although we can't really optimize the backend of the database, there are other feature that give Pg a big edge. One that stands out is it's stored procedure feature, which allows you to pretty much code programs into the database. This is good because those functions you do all the time perform faster. These functions might involve querying/joining two tables, or changing the format of a date, or producing some sort of special ID. The sky is the limit.

    Just a forewarning, make sure to VACUUM Postgres regularly. This is a good feature that reduces the bloat, reindexes, and partially auto-optimizes the database. Users here at x10 have the ability to VACUUM their databases. One time a query started taking 15-20secs to perform and I realized I hadn't VACUUMed it in almost half a year; after I did, everything was running instantly. Things like that happen to MySQL too, but users have no way to clean it up, unless they create new tables and dump the data into them -- this is a problem for auto_incrementing field, which you don't have control over.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  6. #6
    LHVWB's Avatar
    LHVWB is offline Lord Of The Keys LHVWB is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Australia
    Posts
    1,308

    Re: MySQL vs PostgreSQL

    Interesting, I have personally always used MySQL, but I looked up PostgreSQL when I x10 started supporting it. To see if there was any point, Most things I read said PostgreSQL was slower but had better features, so I didn't see any point in changing. Although I use SMF 2, and integrate all my scripts into that, its supports MySQL and PostgreSQL so I could change over fairly easily.

    Do you know exactly which version of PostgreSQL x10 is running? If its 7.x then the MySQL might be faster anyway.

  7. #7
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: MySQL vs PostgreSQL

    x10 is running 8.1 I believe. I'm not exactly sure what version of Linux they're running, but I know PostgreSQL 8.1 is part of the Red Hat package. And if you go into Postgres, in the SQL interface you can just type "Select version();" and it'll pop up the version

    I'm trying to get them to upgrade to 8.3. Both 8.2/8.3 have made some changes since 8.1, but the most notable is the Full Text Search capability in 8.3. Basically, it gives you a platform to store parsed text documents (.xml, .html, .txt, possibly even PDFs) and the ability to search the database.

    Essentially it is a preconstructed search structure for you, much like how Google stores its data. It even comes with canonical libraries - the part of the algorithm that says when someone types "whisperers" it'll find "whisper and whisperer" and maybe even whisp. It also has libraries of words that shouldn't be matched (if you choose) like "the, a, is, be, etc." I'm particularly interested in this because I would like to enable an advanced search function for my site that doesn't rely on flat text files, or a third party engine like Google -- despite the stock ownership I have in the company ;)


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

    Another thing that people may not know is that PostgreSQL was originally designed by the makers of the Ingres database. Ingres had commercial and government support and after it's rise it gave way to Sybase and MS SQL Server, as well as a few other hatchlings.

    Well another project that the owner of Ingres started was PostgreSQL, which is kind of how it got it's name: post-Ingres => Postgres. Postgres was the original name, then they tacked on the SQL part just for familiarity and to rival MySQL.

    -- just a few tidbits of useless information --
    I actually appreciated learning this, because I had heard about Ingres before because it used to be big commercially and sectors of the govt even used it - Postgres, on the other hand, seemed new to me when I first learned of it and I didn't know if Postgres could be trusted. After learning about the affiliation between the two, that's when I think I actually gave Postgres a shot.
    Last edited by vol7ron; 03-13-2009 at 01:18 PM.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  8. #8
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: MySQL vs PostgreSQL

    Here's also a helpful link for the PHP programmers:

    http://www.onlamp.com/pub/a/onlamp/2...ostgresql.html
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  9. #9
    thaob is offline x10Hosting Member thaob is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    5

    Re: MySQL vs PostgreSQL

    thanks for the info. I'm a newbie. I'm not familiar with PostgreSQL, but I will try it.

  10. #10
    anotherdv is offline x10Hosting Member anotherdv is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    8

    Re: MySQL vs PostgreSQL

    I am glad to some of you talking about PostgreSQL. I have been using PostgreSQL personally for about 5 years. And finally I am using it professionally. I have been using Oracle for over 12 years. I read an article once that said PostgreSQL was the open source version of Oracle. That was a funny statement, but I understand where it was coming from. The database features of tablespaces, archive logs, schemas, table partitioning, on-line backups, exporting and importing, stored procedures & triggers, two phase commit, declarative referential integrity, and it adherence to the SQL standard have really made it a candidate for an enterprise class database. Yes, MySQL has grown as well and if you use the InnoDB storage engine for your tables, then you get a database that can actually be reliable.

    What will be interesting will be what happens to MySQL with Oracle's acquisition of Sun, who bought MySQL in 2008. But then of course InnoDB has been owned by Oracle for the last three years anyway.

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 07:27 AM
  2. Which is better postgresql or MySQL?
    By Kurai Kumo in forum Scripts & 3rd Party Apps
    Replies: 11
    Last Post: 12-10-2009, 08:17 AM
  3. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  4. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM
  5. Have a problem with my forum
    By tikloos in forum Scripts & 3rd Party Apps
    Replies: 43
    Last Post: 01-19-2006, 01:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers