Slashdot Mirror


Top 5 Reasons People Dismiss PostgreSQL

Jane Walker writes "In an effort to dispel some of the FUD surrounding this impressive product, this article puts forth several of the most commonplace reasons for a user to dismiss PostgreSQL." From the article: "While PostgreSQL's adoption rate continues to accelerate, some folks wonder why that rate isn't even steeper given its impressive array of features. One can speculate that many of the reasons for not considering its adoption tend to be based on either outdated or misinformed sources."

132 of 704 comments (clear)

  1. Availability by Anonymous Coward · · Score: 5, Insightful

    MySQL is pre-installed by most webhosts, and does the job for most tasks.

    First post?

    1. Re:Availability by NutscrapeSucks · · Score: 5, Insightful

      I know MS Access, Access came with Office, Access is fast and easy, and Access does all the things that I need a database to do...

      (Only partially being sarcastic here. Access is fine for a lot of things. It's just the mentality that kills me. LAMP Developers are the true heir to the VB/Access Guy Mentality)

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    2. Re:Availability by ShieldW0lf · · Score: 2, Interesting

      That's why it's so popular. Older versions were fast and lightweight and $10/month hosting providers loved it because you couldn't bog their servers down with it because the features to do complex queries just weren't there. Because all the cheap hosting providers had it, everyone learned to use it for their rinky-dink little scripts. Postgres was always better, but it gave your ignorant little novice PHP scripters the power to run very complex queries that will put your server under load, and when you're trying to fit as many cheapo customers onto each server as possible, that's not good.

      --
      -1 Uncomfortable Truth
  2. The author, Jason Gilmore... by tcopeland · · Score: 4, Informative

    ...coauthored an excellent book on PostgreSQL that was just published by Apress. The title makes it sound like it'd be a bit light, but it takes you all the way up to writing stored procedures, writing C programs that hit the database, using all the utilities, and so forth. I'm using PostgreSQL as a Jabber backend and the book has already proved useful.

    Too bad they didn't talk about hitting PostgreSQL from Ruby... but since most folks are using ActiveRecord to do that, it's probably not a big deal. And if you use the Ruby/C client, it's quite snappy.

    1. Re:The author, Jason Gilmore... by jadavis · · Score: 3, Informative

      Lack of support is certainly a reason that concerned many companies in the past.

      Now that Sun has 24x7 support for PostgreSQL, that issue has been soundly put to rest.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  3. The name by smittyoneeach · · Score: 4, Interesting

    "Postgre" is three times as long as "My".

    Then again, the P in LAMP has always been about the scripting language, not the database.

    MySQL and PHP have been quite the dynamic duo of the internet.

    That, and PostgreSQL took longer to have a native Lose32 port.

    The fact that you can bring Python right into PostgreSQL for good stored procedure justice seems to go unnoticed.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    1. Re:The name by XxtraLarGe · · Score: 3, Insightful

      This is exactly what I've thought. I'm an occasional PHP/mySQL coder, but I haven't even approached PostgreSQL. Partly because mySQL works for me, and partly because I can't figure out what the Postgre part is supposed to stand for. It's not a word, it doesn't sound like an acronym, is it the creator's name? The name is pretty awkward, and that can be a fast turn-off for many people. The OSS community might help PostgreSQL gain wider interest/acceptance/adaptation with a simple name change. I'm not trying to troll here, I'm trying to help explain the apprehension from a casual coder viewpoint.

      --
      Taking guns away from the 99% gives the 1% 100% of the power.
    2. Re:The name by ZaMoose · · Score: 5, Informative

      The inventors of Ingres left the company formed around it when it was bought by Computer Associates and started developing the successor to Ingres, hence: Postgres. Make sense?

      --
      I wish I had a kryptonite cross, because then you could keep Dracula and Superman away.
    3. Re:The name by NutscrapeSucks · · Score: 4, Funny

      So, basically it's named after an in-joke about a software package that everyone forgot about 20 years ago. That's a great reason to keep it! Go Go OSS Marketing.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    4. Re:The name by n0-0p · · Score: 4, Funny

      Exceptionally funny coming from the man with the term "Nutscrape" in his nick.

    5. Re:The name by ggundy · · Score: 2, Funny

      It's hot, it's new, LAMP 2.0!

      Linux
      Apache
      Mono
      PostgreSQL

      Gotta love the two dot oh when hyping stuff ;)

    6. Re:The name by soyarma · · Score: 3, Interesting

      While I agree that in a business environment the name of a product being the sole reason (though the author didn't specifically indicated it was his sole reason) not to choose something may be irresponsible, one must consider that people in general make base assumptions about all sorts of things from their initial impressions.

      Take for instance how much time and money goes into marketing brands (of anything) and how fiercly a brand name is guarded once its established.

      The problem with PostgreSQL as a name is twofold. Words in the English language that end with gres are rare, in day to day conversation you could probably go weeks without uttering one (digress or regress are ones you may use often, but they are obviously a bit different). Since our thinking and hearing patterns tend to form basic mappings of percieved words to words already known or in common internal use, many people actuall think 'postreg'. The eyes then inform the brain that what they see does not match 'postreg' and the brain then adds 'confusing' to the list of things about Postgres.

      While you may poo poo the people and their internal mental correlations, if you want something to have wide appeal you have to consider things like that. The name needs to be short, simple and easy to remember and relate.

      The second item is that it is pronounced Post-gres-Q-L. For the people who pronounce SQL as sequel, they think the word as Post Gre Sequel. The brain then thinks: 'what the heck is gre?'

      If you think of the names behind other DB products: MySQL, Access, Oracle, MSSQL, etc... (with MSSQL being a possible exception) the names themselves introduce no pronounciation, word association or sylabic issues.

      Task 1 complete. People can talk about these products without having to stop and explain how to pronounce the name. I'd imagine that's one of the first lessons in marketing.

    7. Re:The name by Alioth · · Score: 2, Insightful

      So from a casual coder's point of view, a database named 'MySQL' as if it was Fisher Price's My First Database for pre-school infants sounds better?

  4. Other things... by Saeed+al-Sahaf · · Score: 5, Insightful

    Indeed. And once most people are familure with MySQL and the various tools and language support, there tends to be little reason to switch. PostgreSQL is a better database product, but many (all?) of the features that it's cheering section continue to tell us all about whenever the issue comes up, are simply not ones that the majority of MySQL users want or need. Maybe PostgreSQL fans should target Oracle usres.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Other things... by jadavis · · Score: 5, Insightful

      What about consistency? I talk to people all the time who are befuddled by MySQL's lax type checking. I know it's been hashed out before on /., but February 31st is NOT a date, and does not belong in any column named "date".

      If your application has an bug and inserts an invalid date, you don't want that error to cascade to another application (or another part in your application) and cause more errors down the line. By the time you detect the bug, it could be almost impossible to determine the source of the bug.

      Putting consistency checking in application A doesn't prevent application B from inserting invalid data. And when application A reports an error (due to it's wonderful in-application consistency checking), now you don't know what caused the error. It's long past the time that you can get meaningful state information from application B, at most you have database auditing tools that tell you "application B did it", but that's more easily implemented in PostgreSQL as well (triggers).

      And I'm not talking about super-advanced users only. I am talking about everyone who wants to catch the error early when they have the most possible information. Everyone who's just a programmer who wants to be able to trust that data from the database comes in a meaningful form. Everyone that just wants the database to do either what they expect, or throw an error.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    2. Re:Other things... by antarctican · · Score: 3, Interesting

      Indeed. And once most people are familure with MySQL and the various tools and language support, there tends to be little reason to switch. PostgreSQL is a better database product, but many (all?) of the features that it's cheering section continue to tell us all about whenever the issue comes up, are simply not ones that the majority of MySQL users want or need. Maybe PostgreSQL fans should target Oracle usres.

      Exactly. I know PostgreSQL is a better database engine, but I know mysql, I can't be bothered to learn something new when it seems everything supports MySQL.

      I've tried to use PostgreSQL for a few packages which didn't support MySQL, and I just got tired of the learning curve. All the various different executables to do different tasks rather then one shell like MySQL, a permission system which seemed from my limited usage more perverse then MySQL's (and that's saying a lot considering how bad MySQL's is). I'm sure if I learned more there'd be dozens of tricks that would have made the tasks I was attempting trivial... but why? I have better things to do with my time, like write cool code that uses MySQL.

      PostgreSQL is the Beta of databases. The superior system but the loser in the race because of reasons beyond it's control.

    3. Re:Other things... by Anonymous Coward · · Score: 5, Funny
      I talk to people all the time who are befuddled by MySQL's lax type checking.

      That's why I use SQLite. Its lack of type checking is so profound, nobody has a problem grasping it!

    4. Re:Other things... by jadavis · · Score: 3, Interesting

      And what evidence did he have that MySQL users do not want consistency? I know MySQL users who want consistency and type checking, and are impressed when they try PostgreSQL.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    5. Re:Other things... by Gnight · · Score: 5, Funny
      ...February 31st is NOT a date, and does not belong in any column named "date".

      You're just jealous that your year is shorter than mine. Don't hate on me because I refuse to recognize calendars that skip days. 31 days in every month. It's gotten me in a little trouble at work though...

      Isn't this fixed in recent versions of MySQL anyways?
    6. Re:Other things... by dwater · · Score: 2, Insightful

      > PostgreSQL is the Beta of databases.

      you mean "betamax", right?

      --
      Max.
    7. Re:Other things... by jbolden · · Score: 4, Insightful

      I agree with you 100% (and I'm an Oracle guy). Where I think the free databases are:

      Postgres -- getting closer to the kinds of features Oracle users want. Probably about at 8i level now. OTOH speed is nowhere near Oracle

      MySQL -- Roughly the same speed as Oracle. Doesn't scale. Features ain't even close (though 5 is miles ahead of 3, another 10 years and...)

      The problem for Oracle corporation is that 95% of Oracle users don't need the features of Oracle and thus MySQL is a good replacement for them.

    8. Re:Other things... by jadavis · · Score: 4, Informative

      Isn't this fixed in recent versions of MySQL anyways?

      In the last thing I installed which is whatever came from the FreeBSD ports collection, it was still a problem. 4.1 I believe.

      As MySQL gets a lot of flack for this poor design philosophy*, they have come up with "strict mode" as a solution. That's a configuration option that is more strict about reporting errors. It's a step in the right direction, but that makes it wildly imcompatible with many MySQL applications.

      So it's "fixed" in the sense that you can optionally break backwards compatibility to fix it. I haven't heard many reports about people actually trying to use strict mode.

      * MySQL has backtracked on design philosophy before. Remember back when an ACID transaction was evil and slow and MySQL would never implement transactions or triggers or anything else?

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    9. Re:Other things... by adolfojp · · Score: 4, Insightful

      I "inherited" a badly designed MySQL database that a couple of developers were shoveling data into with their nifty little apps. Empty dates were sometimes NULL and sometimes 0000-00-00 and sometimes something else. Also, since it was designed with MyISAM tables there was no referential integrity and there were countless orphans. I am so glad that it was not a database that dealt with bank accounts.

      MySQL has never cared about enforcing database integrity and are just starting to do so. The sad part is that the vast mayority of the people that use MySQL because it is the default database don't fully understand what data integrity or consistency is.

      Cheers,
      Adolfo

    10. Re:Other things... by jadavis · · Score: 2, Insightful

      MySQL has never cared about enforcing database integrity and are just starting to do so.

      Yes, the fact is that MySQL is trying to adopt a more PostgreSQL-like philosophy, using their market share and name recognition. In the meantime, the current users are in for a rough ride of backwards-incompatibility.

      So, the question is, does MySQL get PostgreSQL's features and philosophy in place before PostgreSQL get's MySQL's market share in place?

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    11. Re:Other things... by Anonymous Coward · · Score: 2, Insightful

      You might have something there. For some of our work mysql is stupid fast. But when we threw it at a nested query joining two tables, one with half a million rows and the other with five and a half million, mysql ran all night using 400MB of RAM and still couldn't return a result. Postgresql, with a fourth of the memory, spit out a result set in less than three minutes.

      Simple web shit, sure, mysql is the way to go. But mysql's query optimizer still wets the bed for serious data churning. If you have heavy lifting to do and don't have the money for Oracle postgres is golden. I just wish those guys could sell themselves better. Assuming they want to, of course.

    12. Re:Other things... by consumer · · Score: 3, Informative

      Strict type checking and triggers are both in MySQL 5, which has been out for a while now. You need to update your complaints.

    13. Re:Other things... by jadavis · · Score: 4, Insightful

      I would be interested to see some benchmarks to back that up. PostgreSQL has a lot of features that can be used to improve the speed of a query by orders of magnitude.

      What if you have a table and you need a functional index on a user defined function? MySQL can't even do that, so it will be forced to scan the whole table. PostgreSQL makes it trivial.

      PostgreSQL can also combine indexes into in-memory bitmaps before looking in the table. That means you don't have to make a multi-column index for every combination of attributes you select. This is done automatically by the planner.

      When you actually make use of some of the "features that nobody needs" in PostgreSQL, you can see huge performance gains. I'm not sure how it stacks up against Oracle, because they don't let their users publish results.

      But yeah, you're right. If you just port some MySQL code to PostgreSQL, the PostgreSQL code will likely not perform as well (unless there are joins where the planner can use some of the features like the bitmap index).

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    14. Re:Other things... by hackstraw · · Score: 3, Informative

      I "inherited" a badly designed MySQL database that a couple of developers were shoveling data into with their nifty little apps. Empty dates were sometimes NULL and sometimes 0000-00-00 and sometimes something else.

      I "inherited" a badly written C++ project where an integer was to be displayed as ASCII text, and the data structure was a character field, and not an integer. Oh, sometimes the number was stored as hex or base 10. Now, the cute part was that this excellent programmer converted the datatype to and from base 10 and hex, and his exhaustive testing apparently never went past 10.

      Now, this code was copied and pasted about 3 or 4 times for different modules like admin or customer or something like that. And each one was subtly different.

      My point is that the tool is not always the problem. Now if C++'s integer arithmetic had an issue, that is another story, but the programmer simply was not good.

      Now, MySQL is not a very logical or robust DB at all times, but it is documented, and any competent programmer could have gotten around the 0000-00-00, NULL, and "something else" things.

      I checked some of MySQL's date functions, and one of them does this:

      mysql> SELECT CURTIME();
                      -> '23:50:26'
      mysql> SELECT CURTIME() + 0;
                      -> 235026


      That is weird. The curtime value in numeric context is only good for comparison to another valid curtime() whatever, but it can't be added or subtracted as an integer. Yes, MySQL _should_ make date fields something generic xor NULL, or a valid date, not Feb 31, 2000, but its something that needs to be done at the programming level. Personally, I always use UNIX timestamps (seconds since 1970). They can be directly added, sorted, and converted into any timezone, and its very portable. But thats just me. (Yes, UNIX timestamps do nothing before 1970, etc, etc).

    15. Re:Other things... by jadavis · · Score: 5, Informative

      MySQL's arguments, like it's features, always seem to be mutually exclusive.

      MySQL's benefits:
      * More Applications
      * Has strict mode if you need it
      * Easier to use by default
      * Speed
      * ACID

      The problems are:
      * Strict mode is not enabled by default
      * If strict mode is easier because of all the benefits of data consistency, then MySQL is not easy by default
      * PostgreSQL has more applications than does "MySQL Strict Mode".
      * ACID is only on the InnoDB table type, and the highest basic data access speed is on the MyISAM table type

      The list goes on. You can argue any one point and say it works just fine, and that you don't care about the other ones.

      But PostgreSQL is a whole solution. When they say you have ACID compliance, it doesn't matter what tables you operate on. When they have a reasonably consistent SQL dialect, it can't be configured to be drastically different on a whim, making half the applications (or more) not even work. In short, the features in PostgreSQL don't have long lists of dislaimers and incompatibilities with other features. They just work as advertised.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    16. Re:Other things... by adolfojp · · Score: 3, Insightful
      Yes, MySQL _should_ make date fields something generic xor NULL, or a valid date, not Feb 31, 2000, but its something that needs to be done at the programming level.
      A database should enforce certain rules so that its data will not be compromised. It must not allow bad external code to destroy its integrity, otherwise, it will be worthless for important applications. That is the purpose of features like stored procedures, constraints and trigers. MySQL has those features, but it is still missing some details like type consistency in certain areas.

      When it should be done, it should be done in the outside.
      When it must be done, it must be done in the inside.

      Cheers,
      Adolfo
    17. Re:Other things... by jbolden · · Score: 2, Interesting

      What if you have a table and you need a functional index on a user defined function? MySQL can't even do that, so it will be forced to scan the whole table. PostgreSQL makes it trivial.

      You are going to laugh but since MySQL basically uses a 1 application model you just de-normalize and have the functional field inside the table itself.

      As for benchmarks there are plenty of benchmarks of Oracle vs. MySQL (a tie to slightly in MySQL's favor on what MySQL does well using cheap hardware. Anything else Oracle wins). There are plenty on benchmarks of MySQL vs. Postgres. The Postgres people seem to dispute these but they show MySQL killing Postgres. You can download Oracle for free. Benchmark it and go ahead and publish. That's a pure a 1st amendment case as I can imagine. Let them try and sue.

      PostgreSQL can also combine indexes into in-memory bitmaps before looking in the table. That means you don't have to make a multi-column index for every combination of attributes you select. This is done automatically by the planner.

      Oracle has a custom engine for star queries. It has some pretty substantial transformation rules when needed. As for MySQL it doesn't even pretend to support Datawarehousing so ...

    18. Re:Other things... by dodobh · · Score: 2, Informative

      You _can_ do the same things from the psql prompt. The system executables just make life easier.

      --
      I can throw myself at the ground, and miss.
    19. Re:Other things... by dfetter · · Score: 3, Informative

      Just one teensy little problem with "strict mode:" any client can turn it off! Somebody is unclear on the concept of Codd's 12th rule.

      --
      What part of "A well regulated militia" do you not understand?
    20. Re:Other things... by KiloByte · · Score: 2, Informative

      Yes, UNIX timestamps do nothing before 1970, etc, etc

      Incorrect. time_t is always signed, and thus it can represent any time from 1901 to 2038 on 32bit systems, and two thousand times the age of the Universe on 64bits.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    21. Re:Other things... by jadavis · · Score: 5, Insightful

      Excellent point. That breaks isolation, and a bug in one application can still cascade problems into other applications.

      In particular this is likely to allow security problems in the application to cause malformed data to be entered into the database, thereby affecting other applications.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    22. Re:Other things... by Decibel · · Score: 4, Informative

      There are plenty on benchmarks of MySQL vs. Postgres. The Postgres people seem to dispute these but they show MySQL killing Postgres.

      Every single MySQL/PostgreSQL benchmark I've seen has either been absurdly trivial or benchmarked with MyISAM which is an apples to gorillas comparison. And they're all old benchmarks as well. Unlike MySQL's apparent philosophy of "1) Do the minimum to be able to claim we have feature XYZ 2) Make it fast 3) Maybe think about making sure it works sanely", the PostgreSQL community's top-most concern is data quality; performance is always seconday to that. Because of that there had been a lot of room for improvement through the 7.3/7.4 timeframe.

      That's no longer the case. People commonly see 30%+ speed improvements from 7.4 to 8.0, and 2x that from 7.4 to 8.1. And more improvements are on the way. 8.2 is looking to have on-disk sorts that are 4x faster than today, as an example.

    23. Re:Other things... by Lispy · · Score: 5, Funny

      Basically once I retire I have this scheme to sue all sorts of companies for getting paid on a monthly basis but providing less service in February or even in a 30 days month. This should keep me busy til I die and sounds like a fun petproject to manage from my couch. :)

    24. Re:Other things... by Kjella · · Score: 2, Informative

      ncorrect. time_t is always signed

      Unfortunately. that depends on where you look. Let me point you do the latest QDateTime class in qt. The relevant bits:

      void setTime_t ( uint seconds )
      uint toTime_t () const

      Now this may be due to limitations on other platforms, but in any case you can't assume that everyone using "time_t", or that think they do, can handle signed integers.

      --
      Live today, because you never know what tomorrow brings
    25. Re:Other things... by sydb · · Score: 2, Informative

      Have you looked at phpGroupware or it's prettier offshoot eGroupware? They come with one, maybe two forum modules. The one I used was Fudforum, bad name but it works. Works with either PostgreSQL or MySQL, at least on Debian you get the choice at install time.

      --
      Yours Sincerely, Michael.
    26. Re:Other things... by masklinn · · Score: 2, Informative

      I shall inform you that PunBB does run on PostgreSQL if you wish it to.

      --
      "The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
    27. Re:Other things... by cvalente · · Score: 3, Insightful

      "Simple web shit, sure, mysql is the way to go. But mysql's query optimizer still wets the bed for serious data churning. If you have heavy lifting to do and don't have the money for Oracle postgres is golden."

      right on.

      MySql should be considered for things that only need to be structured a little better than a plain textfile when the number of entries renders the textfile approach not practical. This is say webapps where you only need to save name/email/address, etc. For this MySql is better and faster than Postgres and therefore a better option.

      For applications whose main need is to have a large number of complex related data stored, don't even think MySQL here.

      Specially if your queries use a lot of joins (say 3 or more). Postgres is the way to go. Good performance, better data integrity and many more (used/usefull) features. If you do a lot of delete/updates then you'll have to have a good "cleanup" procedure or performace will become very low. This can be done on the fly and usually during a time period where data isn't much used (most usages have a period where access is low, but not all).

      Version 4 was a great improvement on almost all of this.

      --
      https://www.accountkiller.com/removal-requested
  5. Web developers... by schon · · Score: 5, Interesting

    I think first and foremost is that is web developers who don't understand SQL, and so go about happily re-inventing its functionality in their web apps.

    99% of the problems that web developers face have already been solved for them, but they think that SQL is just a data dump, and thus see no reason to use Postgres, because they think that MySQL does everything they need. In reality, their apps would be faster to write and easier to maintain if they used SQL features.

    It's kind of like perl-syndrome, but on a larger scale.

    1. Re:Web developers... by syphax · · Score: 4, Insightful


      I think what the grandparent meant is that a database can do more than handle SELECT, UPDATE, and INSERT queries, and that web apps that use DB backends contain a lot of code for functionality that could have been handled more efficiently and cleanly by the DB itself.

      Ironically, I think your post kind of validates the grandparent, in that you seem to implicitly be thinking of SQL databases as little more than a better place to store data than a flat file.

      Cheers.

      --
      Simple Unexpected Concrete Credible Emotional Stories
    2. Re:Web developers... by ttfkam · · Score: 4, Funny

      I could tell you, but it'll take me a while to explain it in just one line.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    3. Re:Web developers... by schon · · Score: 4, Interesting

      perl-syndrome is the nasty habit that perl programmers get into (some might call it a mild case of brain damage), wherein when presented with a problem, say "oh, that's easy - it will only take me 10 minutes to whip up a perl script" rather than using an existing tool that does the same thing, easier, with much less hassle and opportunity for error.

      An example:

      Newbie-admin asks "how do you make your syslog files go to a different machine?"

      Perl-syndrome admin says "oh, that's easy - just write a quick perl script to tail the log files you want, then open a TCP connection to a perl script on the remote machine to write the data. I could write that in 15 minutes!"

      Experienced-admin says "Why don't you just configure syslog to send the files to the remote machine? It takes all of 5 seconds."

      perl-syndrome admin "TMTOWTDI!"

      (and yes, this exchange *really* happened, but it's not the only one - I've seen lots of other examples of guys with perl-syndrome posting perl scripts that could be done much easier with things like sed and awk.)

    4. Re:Web developers... by EABinGA · · Score: 4, Funny

      From bash.org Quote #6618

      Jon^D: I had to cat 8-9 seperate quote files, compare each line in each of them to make sure there weren't any duplicates then sort

      Jon^D: I wrote a nasty perl script to get it done

      Jon^D: and it didn't work very well

      skank: cat quote*.txt |sort |uniq

    5. Re:Web developers... by Al+Dimond · · Score: 3, Interesting

      In the case of the syslog thing, I'd have to wholeheartedly agree with you. On the other hand, if you're a Perl ninja and a weakling at sed/awk you might be better off just using Perl if you only need sed/awk's particular functionality occasionally.

      Maybe I'm a hopeless desktop-fed n00b, but I've only used awk once, to take some experimental data that I'd previously entered into a file by hand, transform it a bit to provide input to gnuplot, then mangle it into a TeX table. It took a bit of time to learn, and you know, if I had to use it again I'd have to learn most of it over! I'm not entirely sure it was worth the time. Perhaps people like me should try to learn Sprog instead... or maybe just give in to the supposed "dark side" and enter the table into a spreadsheet and paste it into one of those hellish beasts they call "word processors"... NEVER!

    6. Re:Web developers... by phsdv · · Score: 4, Informative
      you do not even need 3 different commands, and certanly no pipes:

      sort -u quote*.txt
    7. Re:Web developers... by pimpimpim · · Score: 2, Interesting

      yup, another one who fell into the useless use of cat trap!

      --
      molmod.com - computing tips from a molecular modeling
    8. Re:Web developers... by Tarwn · · Score: 2, Insightful

      At the same time, aren't all of the reasons you mentioned also good reasons to seperate the SQL from the code asmuch as possible? Move everything to stored procedures, perhaps even encapsulate those calls in your code in their own functions, etc and then you can make just about any major changes ot the backend you want, provided you also update the stored procs. From the frontend you can change to any other type of datasource you want, provided you update the functions that are actually getting your data.

      There is some logic that is easily moved to the database layer that does not need to be part of the applicaiton logic. I have seen web apps that do running totals or category totals completely on the fly when a simple SUM statement would have sufficed. Logic for INSET vs UPDATE statements canactually be handled by the database in some circumstances, as it actually allows greater flexibility in the future. Want to add traceability? If you already took the previous step than this now bcomes trivial because it can be done in the database withoutever touching the application code.

      Same thing with the front-end. Since we are talking web, there are many reasons (beyinf eficiency) to keep your HTML sparse and try to place most of the formatting and prettiness in external CSS files. This does add complexity if you judge complexity by number of languages, but it adds simplicity to maintainability. Need to make vast sweeping changes to the color of somehting on the site? No problem, you don't need to know PHP/ASP/JSP/whatever, just modify the CSS file (if it was done right). You still have some crossover when it comes to the server-side code that is operating behind the scenes, as you do need o know CSS, HTML, and whatever server-side language your using, but what you won't be doing is searching through who knows how much code for the single remaining bgcolor attribute or inline style attribute.

      I agree that taking this concept too far is worse than no seperation at all. But in moderation you do get a large number of advantages. I actualy had a good example of "too far as to be useless" the other day when our coop explained the restricionts their teachers were putting on them for a software project:
      5 distinct layers in a web app, not counting CSS, with every layer bleading into at least 2 more. A change to the database directly affected a minimum of 2 other layers as the hardcoded SQL statements were in the next layer and the table-specific classes were in an additional layer (relationships were variables references between the objects)...there was more, but it bothers me everytime he mentions it.

      --
      Whee signature.
  6. Nobody's heard of it by Dlugar · · Score: 4, Interesting

    The biggest reason I've found personally why people don't use postgres is because they've never heard of it. Everybody and their dog has heard of mysql, but I've never found somebody who knows about postgres who isn't actually using it. mysql, for whatever reason, just has better marketing.

    Why that is I'm not entirely sure, since ever since I discovered postgres, mysql has been relegated to the role of "use-only-when-a-stupid-web-app-can't-use-anything -else". If I want a toy database, I'll use sqlite. If I want a real database, I'll use postgres. There really isn't much room in between the two.

    Dlugar

    --
    Computer Go: Writing Software to Play the Ancient Game of Go
    1. Re:Nobody's heard of it by TekPolitik · · Score: 2, Funny
      I've never found somebody who knows about postgres who isn't actually using it.

      Of course! PostgreSQL is so good that when people learn about it they switch to it. Hence anybody who knows about PostgreSQL uses it.

      Ever since I discovered postgres, mysql has been relegated to...

      Precisely!

  7. Interesting article, but not the reasons I hear by dskoll · · Score: 5, Interesting

    I don't hear those reasons when people dismiss PostgreSQL. The ones I hear are:

    • VACUUM is a pain. It's true that VACUUM is annoying, but later releases (especially 8.0 and 8.1) make VACUUM much more tolerable; we have customers whose databases are busy 24/7, and although the load does go up during a VACUUM, the database is still perfectly usable.
    • PostgreSQL is slow. That was true, but the 8.x series has improved performance dramatically.
    • PostgreSQL is hard to install and administer. Really, I think this is a matter of taste. If you are used to MySQL, then yes, there is a learning curve. OTOH, I'm used to PostgreSQL and find myself having to learn MySQL, and MySQL feels just as weird and unintuitive to me as PostgreSQL might to a long-time PostgreSQL user.
    1. Re:Interesting article, but not the reasons I hear by The+Master+Control+P · · Score: 4, Funny
      OTOH, I'm used to PostgreSQL and find myself having to learn MySQL, and MySQL feels just as weird and unintuitive to me as PostgreSQL might to a long-time PostgreSQL user.
      So, what you're saying is... PostgreSQL will be strange and unintuitive, no matter what database you prefer and use? :P
    2. Re:Interesting article, but not the reasons I hear by jadavis · · Score: 2, Informative

      VACUUM is a pain.

      Use autovacuum. The current version has autovacuum built into the backend. How much easier can it get? And it shouldn't interfere to much with concurrent connections.

      PostgreSQL is slow.

      It gets this reputation if you run a MySQL app on top of PostgreSQL because MySQL does some types of things faster. However, I think you'll find in many cases the application will have superior performance to the MySQL version if you write PostgreSQL specific code in the application's data access layer.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    3. Re:Interesting article, but not the reasons I hear by jadavis · · Score: 2, Informative

      PostgreSQL will always be slower than a MySQL database that uses MyISAM tables.

      Not necessarily true. What about when joins are a factor? Or what about when you can use a PostgreSQL feature like a functional index (on a user-defined function) to speed up a query, and that's not even available in MySQL? Or what about when PostgreSQL has more index usage opportunities, like the ability to combine two indexes in an in-memory bitmap before scanning (that means you don't have to make multi-column indexes for every combination of attributes you select, and it organizes the tuples to fetch into sequence for faster reads)? What about the ability to manage a large number of joins with the GEQO (genetic algorithm for determining the optimal join order)?

      There are all kinds of opportunities for speeding up queries that don't involve sacrificing consistency.

      Then again, MyISAM should not be used for anything more complex or important than storing cooking recipees.

      What if you're a German and you store the family beer recipe in a MyISAM table? I'd start looking at a place to live in exile in case the power dies and you lose the recipe. You don't get any more mission-critical than that :)

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    4. Re:Interesting article, but not the reasons I hear by DrXym · · Score: 2, Interesting
      PostgreSQL is hard to install and administer. Really, I think this is a matter of taste. If you are used to MySQL, then yes, there is a learning curve. OTOH, I'm used to PostgreSQL and find myself having to learn MySQL, and MySQL feels just as weird and unintuitive to me as PostgreSQL might to a long-time PostgreSQL user.

      Can't speak of Linux / Unix but on XP, Postgres is a doddle to install and administer. After a fairly small download, double click the installer, answer a few questions about ports and its installed as a service. To administer it you fire up pgAdminIII and get an excellent GUI for creating users, running queries and so forth. It also has excellent online documentation in HTML format, plus all the drivers, libs & headers you need to get it work in a dozen different ways.

      In fact Postgres is such a breeze to install on XP that it is easier by miles than MS SQL Sever, or Oracle, both of which require lengthy and complex installs to complete.

      MySQL is also fairly easy to install XP (it has an installer too), and also installs as a service and HTML help. But I wouldn't say its as easy for Postgres. For one thing you don't get an admin tool (or the dev kit) which means it's considerably more difficult to administer.

      I'm sure this would pose no problem for people who love being stuck in a console based admin tool, but personally I prefer the more productive environment offered by pgAdminIII... when it works which is usually most of the time although it has the odd quirk.

      One thing I appreciate about both products is how small they are. SQL Server is basically an entire CD to install. Oracle is multiple CD. Both are far too huge for pretty much most uses any individual or small outfit might have for a database.

      So definitely on XP, Postgres is far easier to install, administer and use than MySQL. I can't say I've used either in anger, but I was able to hook Postgres up via the ODBC driver to OpenOffice Base and use that as a front end for data entry for some experimental work I was doing.

  8. Number 1 (missing) reason by malraid · · Score: 4, Insightful

    Their database (MySQL, Access, Oracle, whatever) is working for them good enough to justify switching. Me? I'm using PostgreSQL, and I won't switch, even though Oracle now has a free version. Too much work to fix something that's not broken. And while I might never be able to use MySQL in my main project because it lacks some features I really need, it's good enough for lots of people.

    --
    please excuse my apathy
    1. Re:Number 1 (missing) reason by malraid · · Score: 2, Informative

      Namely notifications. This allows me create a very "interactive" aplication.
      To a lesser extent, table inheritance, although I could probably work something out with triggers and a materialized view (but it would be a bigger pain) . Also triggers in MySQL must be done with normal SQL I thinks, while on PostgreSQL I can use a procedural language to make a more complex trigger (There's probably some workarounds for this too, but still... ) There used to be others, but I think they have closed the gap.

      --
      please excuse my apathy
  9. rep-lih-kay-shun by buddha42 · · Score: 3, Interesting

    None of those five had anything to do with why we can't use it. Postgres's replication options are niche afterthought hacks. This immediatly makes it an unacceptable choice for anyone who's reliability or performance needs exceed that of one server. Which is pretty much any system where the cost of downtime is non-trivial.

  10. #1 Reason by __aanonl8035 · · Score: 5, Insightful

    It has to do with mindshare and previous history. Way back in the day... 1997, postgres was difficult to setup for some people. It was not the default choice included in many setups at ISPs. If you wanted to have an interactive web application at an ISP, on a unix machine, the most common option was MySQL. (On a windows machine it would be an ODBC connection to an access database, or a MS SQL server) Once something has achieved a significant mindshare and some momentum it is difficult to overcome. (But not impossible, especially if you do a better job, just takes time)

  11. Or this? by Ex+Machina · · Score: 3, Interesting

    Speed isn't everything but some of these are insane.

    1. Re:Or this? by rtaylor · · Score: 5, Insightful

      Do you really only have one user using the database at any given time? If you do only have one user, speed probably doesn't matter at all.

      Benchmarks like that should be run with a couple of hundred active users all doing different things (mix of updates, insert, deletes, and selects) -- a real world use-case.

      You will quickly find that scores change.

      We had a MySQL versus PostgreSQL battle once. The MySQL people put together a benchmark showing MySQL was nearly 10 times faster. The benchmark was a single user going through the steps.

      We then took the exact same thing and put Apache in front and benchmarked with 5 active users -- now they were about even. At 10 users PostgreSQL was about 5x faster. At 100 users MySQL was unable to finish the test. PostgreSQL was serving each of the 100 users at a rate comparable to how it dealt with 10 active users.

      Benchmarks for benchmark sake is useless. Benchmarks that model your actual use case are quite valuable.

      --
      Rod Taylor
    2. Re:Or this? by consumer · · Score: 2, Informative

      The older table type in MySQL, MyISAM, doesn't handle concurrency well. The InnoDB table type uses the same locking approach as PostgreSQL and Oracle, and should stand up to multiple users much better.

    3. Re:Or this? by rtaylor · · Score: 2, Informative

      Datawarehouse systems often have users running complex query operations.
      SQLLite is not going to handle a 1TB table very easily and I don't believe it supports most types of joins.

      The benchmark linked to does not fit this.

      Besides, 1 user on MySQL or SQLLite (each uses a single CPU only) it going to suck compared to a TeraData, Clustered Oracle or Clustered PostgreSQL (BizGres) database.

      Statement still holds. Benchmark what you will actually be doing.

      --
      Rod Taylor
  12. I know, I know! by Trogre · · Score: 4, Funny

    Why do people dismiss PostgreSQL

    It's because LAMP sounds so much cooler than LAPP!

    --
    "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
  13. Re:Crystal Reports by MagikSlinger · · Score: 2, Informative
    Microsoft owns crystal reports.

    No, they don't. It's owned by a French company called Business Objects. Microsoft just licensed a stripped down version of CR for VB6.

    --
    The bitter lessons of a veteran coder: http://bitterprogrammer.blogspot.com
  14. Personal .02 by cliveholloway · · Score: 3, Interesting

    At OSCON, the Postgres people had postcards on their table of whatever their mascot is (I forget) roasting a dolphin on a spit over a fire.

    Funny yes, but not something that inspires one to take them seriously.

    Ironically, they have a better product on many levels, but that kind of zealotry just plain puts me off.

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
    1. Re:Personal .02 by Yer+Mom · · Score: 2, Insightful
      I think he was referring to the spit-roasting part.

      I'm fairly sure that if Ferrari produced a bunch of promotional material showing the horse crapping on the Porsche logo someone would say the same sort of thing :)

      --
      Never mind Spamassassin. When's Spammerassassin coming out?
  15. Fulltext Indexes by inio · · Score: 4, Insightful

    I have pretty simple requirements for a database, I don't need triggers, stored procedures, or any of that stuff. What I need for web applications is a database that I can efficiently search, and that means fulltext indexes. Sure, there's plugins for Postgres that add fulltext indexes, but they require ungodly complex setup and tuning. With MySQL it's two keywords.

    1. Re:Fulltext Indexes by Ragica · · Score: 3, Informative
      Yes, like most things MySQL, it's simple to get going and hooked on, but half assed, and will bite your ass later if you ever grow beyond a certain point... or in certain directions.

      But of course anyone who is is willing to tolerate MyISAM tables (which mysql's full text indexes still seem to require) already has pretty low standards for their data. (I don't mean "low standards" in a derogatory way.)

      As a programmer of a search engine built on postgresql's tsearch2 I can confirm that it is a pain in the ass in a few ways. Installation isn't one of them. And in fact setup, while certainly more involved than MySQL, isn't very difficult either... if you can be satisfied with the defaults (just run the bundled sql setup script).

      The main problem with the defaults for me is the crude "snowball stemmer" (does MySQL have any stemming support? I did a quick google search but couldn't seem to find any info... though i note some plugins that seem to offer it). Once you get tsearch2's dictionary based stemmer working, things become much more wonderful very quickly.

      On the other hand for anyone who cares about full text search tsearch2, in it's complex design, offers a vast amount of configurability and power. It's indexes are pretty fast. There are multiple ranking algorithms, a "headline" function for pulling highlighted extracts from found text, (limited) field weighting, replaceable tokenizer, multiple languages and encodings, and on and on.

      Unfortunately I don't think it comes close to something like lucene. But that's another kettle of fish.

      Regarding MySQL's full-text search I came across this nice quote (from Kate of Wikipedia):

      We already support MySQL's fulltext search. Its uselessness is mainly what inspired me to write the Lucene support :)

      Of course the parent poster says up front that they have "pretty simple requirements" so all of my comments above probably make no impression at all. But anyhow, just something to think about.

  16. BullShit by slashpot · · Score: 5, Funny

    #1 because we're lazy ass sys admins who learned mysql first and don't want to bother learning another software package that does more or less the same shit . sad . true .

  17. Basic marketing by murderlegendre · · Score: 2, Interesting

    Stupid as it sounds, I don't think most people can intuitively pronounce "PostgreSQL" (I know I can't). It's much easier to say "My SQL" and not risk sounding (or feeling) like a dunce.

    Check with the marketing folks - this kind of thing is really important when it comes to general acceptance. When it rolls easily off of the the tongue, it's more likely to be discussed.

    --
    There's a Starman, waiting in the sky / He'd like to come and meet us, but he hasn't got the time.
  18. There are other reasons by Martin+Foster · · Score: 5, Informative

    PostgreSQL is not necessarily the easiest beast in the world to get going. A few years back, I converted a chat/gallery portal system Ethereal Realms (http://www.erealms.org/ from MySQL to PostgreSQL, since at the time it was felt that features like proper referential integrity and stored procedures would really pay off.

    The code was shortened considerably, was more stable overall and the OpenBSD port compiles properly without threading issues. However, despite all of those advantages and the database server being on a bigger server with more memory performance suffered considerably.

    Want a good starting place in settings? The default documentation does little if anything to really help you on the matter, its like trying to learn the English language solely through the use of a dictionary.

    There are tutorials available, some out of date and while Usenets can certainly help, you'll get wildly varying answers because some of the configuration options are more black magic then science. Rather makes it hard to get started when you don't know exactly where to start or how increasing a value will really affect performance as a whole. You are expected to load test the database before implementation which is not always possible for small hobby sites, and it can test patience.

    With MySQL you had a few configuration files designed for use in various environments and it would show you how certain settings had changed. This is not the case with PostgreSQL in fact 32 connections is the default which is painfully inadequate for most peoples needs when dealing with a site. I'd personally love to see an application that detected your memory and other settings and came out with sane settings, at least with such an option you'd have a place to start.

    Queries were slow, but then that was supposed to be MySQL's strength. Solution? Run explain/analyze on everything and tweak the hell out of every single query being generated. If you don't necessarily understand how the query is analyzed and run by PostgreSQL then there must be something wrong with you!

    Vacuum? That concept alone can throw people in for a loop, especially when designing a system which is meant to be run by people with no technical experience. So you have to code in a serious amount of intelligence into the application or rely on Auto-Vacuum (not available at the time) which can slow performance down even more.

    Because of vacuum, I had to design a process for the site to lock out all users. This had never been required under MySQL and took a while for the users to get used to. In certain cases, if the lock-out failed, the vacuum would cause permanent locks in tables which would quickly pile up scripts on the webserver side leading to extreme high loads or just crashing the machine.

    PostgreSQL has a LOT of features and a lot to offer in general. However, there is a major learning curve required to get it going right. I've had other sites implement the code and whenever they hit the version which required PostgreSQL most gave up on the idea of migrating or complained endlessly on how things seemed sluggish. That is NOT a major selling point when trying to get the unwashed masses to adopt your product.

    1. Re:There are other reasons by Ragica · · Score: 2, Informative
      I'd personally love to see an application that detected your memory and other settings and came out with sane settings, at least with such an option you'd have a place to start.
      There is this old (and seemingly abandoned) project (pg_autotune). I haven't got around to trying it for the last 3 years, but have always intended to...
  19. A huge omission by PornMaster · · Score: 3, Informative

    If you're doing something on Solaris 10 that doesn't need you to pay out the ass for Oracle, you can get PostgreSQL supported by Sun.

    http://news.com.com/Sun+backs+open-source+database +PostgreSQL/2100-1014_3-5958850.html

  20. Why I have so far resisted PostgreSQL by kimvette · · Score: 2, Insightful

    1. Lack of administration tools

    Having been forced to work with Oracle before they had a usable GUI (It can be argued they still don't) theen MySQL Server, I learned to appreciate a database GUI. I've grown to *HEART* mysqlcc, and more recently mysql-administrator, mysql-query-browser, AND phpMyAdmin. Wake me up when the same are available for PostgreSQL AND they are bundled with major distributions like the MySQL tools are. Oh, and they need to WORK, too.

    2. Familiarity

    When I switched BACK to Windows without having touched Linux for 5+ years, the apps we initially standardized on use MySQL as the back end, many of them exclusively so. MySQL seems to be more ubiquitous in the OSS world, despite its license being less-free than PostgreSQL

    3. Time

    Who has the time to investigate or extend PostgreSQL, and why bother when there is MySQL? I've read up a little on PostgreSQL and I like its feature set better than MySQL, but I'd have to spend time learning about administering, backing up, restoring, configuring, and tuning it properly. I've already put that time into MySQL and right now I need to learn the ins and outs of asterisk on top of my usual workload. MySQL is running just fine, why switch now? When we develop an app for distribution which would not meet MySQL's requirements (e.g, requiring us to GPL the product), THEN I will put time into learning PostgreSQL.

    --
    The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
  21. No newbie guides by kyndig · · Score: 4, Interesting

    When I started programming a website, I knew I needed a database. I also knew absolutely nothing about php, sql, or even what they stood for. I was using a Perl based hacked link farm that used a flat-text database storage. Someone then pointed me to a php link farm that used MySQL. The installation text that came with the app was so easy to follow for a newbie, I had the link farm up and running in no time. I went to Books-A-Million a few weeks later, and found many books on PHP, MySQL, php/mysql - and nothing on PostgreSQL. When I finally did read up on RDBMS, found out that PostgreSQL did some functionality that MySQL didn't (at the time); I already had most of my site designed in php/mysql. I looked more into sub-queries in PostgreSQL, but the community structure was so scattered and non-newbie friendly, I decided to stick it out with MySQL (and havn't regretted it once). So my reasons for preference have nothing to do with wanting a windows version, different language, or other such assumption. Instead, my reasons are:
          * as everyone says, the name is catchy: MySQL
          * when I first was introduced to it, and to this day, Michael 'Monty' Widenius takes a personal interest in his work, and is a real down to earth guy ( had the pleasure of emailing him once) [you can probably still see him posting on the mysql dev lists these days..though I havn't followed it in a couple of years]
          * Extensive script language support for web development
          * Books for newbs and professionals (many books)
          * I like their website more..always have

    My shallow reasons..

    --
    My Thoughts, Kyndig
  22. None of Those 5 Are My Reasons... by nko321 · · Score: 3, Insightful

    The reasons listed in TFA are nowhere near why I don't use it (granted, I've only used databases as toys thusfar).

    A few years ago, I decided to learn a DBMS and teach myself SQL. I tried Access because it's "user friendly." Call me crazy, but I felt it was anything but. So I tried Postgres because everyone spoke so highly of it (and I'm very comfy with the command line). I read a lot of documentation and did a lot of things that felt like "progress" before I gave up.

    I picked up MySQL next. It had some quirks, sure, but it was maybe an hour before I was comfortable enough with the DBMS that it didn't stand between me and learning SQL.

    I picked up Postgres again last year and got much further along with it. I actually made a database, and it had tables and everything. I gave up because everything just "felt" more complicated than in MySQL.

    I really want to learn Postgres. I do. I'm convinced it's more powerful and flexible. I just don't have the time, patience, or need.

    Both MySQL and Postgres have their quirks that make it so you can't just jump in and start playing with SQL, and that sets the bar higher than it needs to be. Sure, every product will have some such complexity, but the lower the bar, the wider the userbase.

  23. I avoid it.... by drgroove · · Score: 5, Funny

    ...because I don't know how to pronounce it.

    Is it "Post Grace"? "Post Grey"? "Poss Grey"? "Poss Gres"? "Progress"? "Platypus"? "Post Raisin Bran"?

    Whatever it is, it sounds vaguely French, which is just suspect to begin with. And I'm not dredging up the whole Iraq/UN thing either, although if I have to invoke Freedom Fries to make a point, I've got the mayonnaise ready.

    Give me a RDBMS that I can pronounce, and I'll use you in my software.
    MySQL. Easy. "My SQL". Doesn't get much easier than that, plus it sounds sorta friendly.
    MS SQL - same thing, slightly different spelling. Maybe not as friendly, but you can put it in a Powerpoint to your boss and not sound like an idiot.
    Oracle. Now you're talking. Even has a bit of mistique to it, a bit of enigma.
    DB2. Not as sexy, but still undeniably pronouceable.
    Sybase. Sock it to me.

    What PostgreSQL - however the hell you say that - really needs is a new name. Forget features, forget marketing, forget RDBMS death match performance comparisons. Nobody cares. MySQL lacked tons of features for years, and we all used it then and continue to use it now. Why? You can pronounce it. Simple.

    1. Re:I avoid it.... by kestasjk · · Score: 3, Funny

      PostgreSQL/Postgres Post-gres-Q-L The es at the end of gres has to sound like the 'S' in 'S-Q-L', so it's an obvious pronunciation. However MySQL My-S-Q-L or My-See-Quel Apparently it's My-S-Q-L, but there's no way of knowing that by reading the text alone. What other reasons do you have? A dislike for elephants?

      --
      // MD_Update(&m,buf,j);
  24. postgres in astronomy by hogghogg · · Score: 3, Interesting

    FWIW, I have had very good experiences running postgres in astronomy applications, including for of order millions of galaxies with of order hundreds of attributes in the Sloan Digital Sky Survey. For scientific applications, open-source is a must, because (a) you have to be sure that the db is doing what you think it is, (b) you have to be able to rely on support or self-maintainance into the asymptotic future, and (c) (usually) you end up having to make small customizations.

    Point (b) is especially big: in the Sloan Survey early days we had a proprietary database with our only copy of some of our data; when the company went belly-up (I think is was Objectivity), our data was effectively "encrypted" in whatever proprietary internal format was used by Objectivity and we had no way to reverse-engineer it, and no-one to call.

    On point (c), try calling Oracle or Microsoft and asking for customizations that astronomers want. Evidently they don't consider us an important part of their market!?

    --
    David W. Hogg -- assoc prof, NYU Physics
  25. One query - select count(*) from .... by Slashcrunch · · Score: 2, Insightful


    Try this on a table with a couple of million rows

    select count(*) from tablename
    or
    select count(fieldname) from tablename

    This is incredibly slow as PostgreSQL scans the entire table! I know there are work arounds that will return approximate but this isn't good enough. I keep hearing how it isn't possible, that the table stats can't be updated etc... but other DB's handle this extremely fast.

    I love PostgreSQL but I won't recommend it to Clients yet.

    1. Re:One query - select count(*) from .... by linuxhansl · · Score: 4, Informative
      Try count(*) on an InnoDB or BerkeleyDB table... Same thing. Or try anything that does not count the entire table (in that case every database has to do a table or index scan).

      Either you want transactional safety or you don't. If you don't use MySQL with MyISAM tables and have fast count(*), if you do use InnoDB (or better use PostgreSQL), but then there's no single count(*) that can be stored with the table since every transaction may see a different count(*).

      The cool think about MySQL is that you do have the option (with Table-Engines). The cool thing about PostgreSQL are its advanced featured... One example: Hands up, who here knows what a partial index is?

      In PostgreSQL you can setup indexes that only cover a part of the table (for example if you have an active flag on a table and most queries are on active entries, you can have a partial index only on rows that have active=true, and this can speed up things *significantly*); alas most folks even have not even heard about partial indexes, and that is why they do not appreciate PostgreSQL.

      This is just one example.

  26. Re:For me, one thing remains a [sad] fact by rossifer · · Score: 2, Insightful

    If MS Access is good enough, PostgreSQL would have been massive overkill.

    Good for you for getting that right. A lot of skilled devs won't use anything but the tools they already know, even if there is an astonishingly simpler tool that will get the job done in 10% of the time.

    Personally, I think of everything as Java + PostgreSQL, so I've still got a lot of room to grow :o)

    Regards,
    Ross

  27. Why it gets dismissed where I work. by mpn14tech · · Score: 2, Interesting

    Although where I work we would like to use postgresql, we do not because it does not support case insensitive queries like mysql, sql server and sybase.

    1. Re:Why it gets dismissed where I work. by chundo · · Score: 3, Informative

      Postgres can create indexes on functions. So if you need case-insensitive queries, you can create an index like the following on your table:

      CREATE INDEX my_index ON my_table(LOWER(column_name));

      Then you can use something like the following query:

      SELECT * from my_table WHERE LOWER(column_name) = LOWER('Search String');

      This gives you case-insensitive searching with no performance penalty. A little more setup involved, but the same functionality as the other DBMS's you mention.

    2. Re:Why it gets dismissed where I work. by pHDNgell · · Score: 2, Informative

      Just create a functional index on lower(column) and search on lower(column). There are likely other solutions to this problem (such as ILIKE).

      --
      -- The world is watching America, and America is watching TV.
    3. Re:Why it gets dismissed where I work. by raynet · · Score: 2, Informative

      Sure it does:

      SELECT * FROM sometable WHERE (some_column ILIKE 'SeaRcH STrinG');

      You can also do regexp instead of simple LIKE matches.

      --
      - Raynet --> .
  28. Why I chose MySQL by Reality+Master+101 · · Score: 4, Insightful
    First, let me say that one of my "real" sites uses PostgreSQL, has used it for about six years, and I'm very happy with it. It was the right decision.

    Now, about a year ago, I had a client that wanted a web site back-end written. Now, I wasn't sure what the future of that site was going to be, whether I was going to be involved, etc. I also knew that it would be probably be run on inexpensive shared hosting solutions.

    Guess what I chose? MySQL and PHP. The reason was because those are always available. It gives my client the flexibility to move it to any hosting solution. PostgreSQL simply is not everywhere. In my case, I run my own servers and can afford to have to understand it. But my client needs a hosting solution that does all the work for him (including back-ups). There's something to be said for using "the standard".

    And you know what? I originally chose PostgreSQL because it was ACID compliant, but I have to say that MySQL sucks a lot less than it used to. It defaults to tables that support commit/rollback. It supports sub-transactions (which PostgreSQL v7 doesn't support, not sure about 8). It (FINALLY) supports sub-selects. If you're still turning up your nose at MySQL, it really isn't as bad as it used to be.

    --
    Sometimes it's best to just let stupid people be stupid.
  29. How about... by JoeCommodore · · Score: 2, Insightful

    Installation

    Good installation documenation with Postgres is pretty sparse. It's not too complicated but it's not easy to find answers. This mainly includes how to properly setup pg_hba.conf which is vague at best on how to configure.

    It might be better in newer installs but in RHEL3 I was just scraping along.

    Application Support

    As mentioned there are some great apps, but there are just are not many applications supporting Postgres, most web apps are LAMP (with M being very much in represntation). I think it would help Postgre if there is a comprehensive PHP-PGSQLPHP-MYSQL conversion equivelants document/tool to help developers either to transition or at the least open up the cross-platform support for multiple DB engines.

    Documentation

    Recently there have been a growing number of updated books on Postgres including those which work along with PHP, so that situation is improving, the books I had to work with were circa 2000 or earlier before schema support.

    So, yes, I tried it, for a while, almost got there, but I just wasn't achieving as much progress as I had hoped. Maybe later I'll go back when conditions get better.

    Keep up the good work, I'll be watching.

    --
    "Enjoy what you're doing! If it becomes drudgery, you're doing it wrong!" - Jim Butterfield
  30. Re:Why I'd rather not use PostgreSQL by RelliK · · Score: 4, Informative
    I was a big fan... until I needed to use PostgreSQL 7 for a real (commercially available) product. To call it slow would be an abomination of the word. Slow doesn't even begin to describe b-tree insert times. Yes, I tuned the engine and dropped indexes at the appropriate times. Yes, my data structures were relational. Yes, this contradicts some published benchmarks. My use is real world and in reality, PostgreSQL is slow... and a bit buggy.

    Absolute bullshit. I've used PostgreSQL myself in a mission-critical production app for the past 3 years. (I've since left the company, but the app is still in use.) I have been consistently impressed by the quality and performance. There was a strong push to use mysql when the project started since the company already had in-house knowledge of it. Performance was one of the concernes. So I ran the benchmarks. Read performance of simple selects was inconclusive: mysql won some, and postgresql won some. However, postgresql consistently won write tests and scaled better as I added more client threads.

    Nested parentheses in SQL can cause an engine crash. " like ... (SELECT A INNER JOIN B) INNER JOIN ..." But the crashing is tolerable. Hand-holding the query optimizer is not. Quite often, the optimizer gets the query plan wrong. Sending special commands to disable internal features is often the only resort.

    Bullshit again. Never ever seen that or even heard about it. Again, at my last job postgresql was part of a mission-critical application, and I've used it for a couple of projects before that too. The *only* time I've seen postgresql go down was when we ran out of disk space. And even then, it was not a crash but a clean shutdown. Give me a specific example of a query that you say caused postgresql to crash. Otherwise I'll assume you are yet another troll.

    While it's true that PostgreSQL is more database than most corporate weenies need, it falls down in moderate write environments. It's best used for systems that write data very infrequently, otherwise it fragments quickly. The only solution to table and database fragmentation is dump & reload.

    Bullshit 3x. The app I was talking about was used for tracking work in a 3d production pipeline with a staff of ~300 artists. There was *a lot* of writes. (every checkin, every render, etc.) By the end of the project the database grew to over 10G. And postgresql didn't even blink.

    Vacuum is asinine. Any command that needs to be run periodically under threat of complete and total data corruption should not be. That's right. Only PostgreSQL makes you vacuum or else your transaction ids overflow. This is modern? I'm shocked.

    And your point is? All it requires is a single entry in crontab. And you can still run transactions while it's vacuuming. Really, what is your problem with it? It is no different than running a cronjob to do a backup, or a similar maintenance. And since 8.0 and up, postgresql does autovacuum, so you don't even have to worry about that.

    So, in short, from my experience PostgreSQL Just Works (TM). And unlike oracle it doesn't cost an arm and a leg, and doesn't require an army of DBAs and sysadmins to maintain it.

    --
    ___
    If you think big enough, you'll never have to do it.
  31. Competence required by linuxwrangler · · Score: 3, Interesting

    One "problem" with PostgreSQL is that it assumes actual competence on the part of the administrator. The default ./configure ; make ; make install is designed to create a system that will actually start up on as many platforms as possible. After that, it is up to the competent administrator to tune it for the specifics of the installation. Using the default PG install in a performance comparison demonstration shows nothing but the incompetence of reviewer.

    Have a 2 CPU AMD64 box and 16 GB RAM and fast SCSI drives as your dedicated DB server? Fine, make your settings appropriate for that. Running on a shared P200 with 128M RAM and a slow IDE drive? Different tuning entirely. I have production systems at both ends of the scale.

    I am extremely happy with PostgreSQL. It's robust as hell - I've had individual PG connections to the DB up for over a year. On rare occasions I've had a machine running PostgreSQL get unceremoniously killed but every single time when the machine has been restarted, PostgreSQL has started up without any problem. This is not always the case.

    --

    ~~~~~~~
    "You are not remembered for doing what is expected of you." - Atul Chitnis
  32. Re:Why I'd rather not use PostgreSQL by edwdig · · Score: 2, Informative

    I was a big fan... until I needed to use PostgreSQL 7 for a real (commercially available) product.

    PostgreSQL 7 is ancient. There have already been multiple releases in the 8 series. I never worked significantly with 7, so I can't comment on it much, but with 8.x I haven't had the problems you've talked about.

    Nested parentheses in SQL can cause an engine crash. " like ... (SELECT A INNER JOIN B) INNER JOIN ..." But the crashing is tolerable. Hand-holding the query optimizer is not. Quite often, the optimizer gets the query plan wrong. Sending special commands to disable internal features is often the only resort.

    I've never seen 8.x crash, even when I've thrown gigantic, deeply nested queries at it. The optimizer definitely needs to be tweaked though. I've noticed that it tends to favor sequential scans over index scans too often. This is fixable by weighting factors in the config file. I will say that it does take some experimenting to get the configuration tuned properly, which is probably the biggest weakness in the 8.x series.

    While it's true that PostgreSQL is more database than most corporate weenies need, it falls down in moderate write environments. It's best used for systems that write data very infrequently, otherwise it fragments quickly. The only solution to table and database fragmentation is dump & reload.

    Those are issues you'll only have if you refuse to run vacuum at reasonable intervals. PostgreSQL has some support for clustering tables. It's only a one time thing that doesn't get maintained during writes, but, periodically running it will solve your fragmentation issues (which wouldn't exist if you just ran vacuum).

    The 8.x series also includes support for autovacuum, which should eliminate the issue completely.

  33. Re:Autovacuum by jadavis · · Score: 3, Interesting

    It all depends on the situation, but PostgreSQL gives you a lot of options. Pretty much every database needs to have cleaner processes to clean free space.

    With PostgreSQL, you can do it manually, or use autovacuum. You can also set the vacuum_cost_delay to change how much it interferes with concurrent access. Whatever works best.

    --
    Social scientists are inspired by theories; scientists are humbled by facts.
  34. No newbie guides by Saeed+al-Sahaf · · Score: 3, Insightful
    I went to Books-A-Million a few weeks later, and found many books on PHP, MySQL, php/mysql - and nothing on PostgreSQL. ... I looked more into sub-queries in PostgreSQL, but the community structure was so scattered and non-newbie friendly

    Two of PostgreSQL's biggest problems: Very little documentation that mere mortals can read (if they can even find it), and a rude, elitist cheering squad. The product my be the greatest thing to hit Open Source since RMS, but most people who need a database (usually for web dev, but yes, often for "real" applications as well) will never find out about all of PostgreSQL's golden features.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  35. Re:Why I'd rather not use PostgreSQL by RelliK · · Score: 2, Informative
    You can run it concurrently only if your Vacuum buffer has not overflowed and thus require to do a more detailed run (FULL) in order to clean up the mess. Such a vacuum WILL lock your tables exclusively and can cause an awful mess if there is a lot of concurrent activity going on.

    1. If by "mess" you mean other transactions will have to wait until VACUUM FULL is done, then yes. If you mean anything else, then no.

    2. re: "vacuum buffer": you just pulled that out of your ass. The *only* thing that VACUUM FULL does and plain VACUUM does not, is physically move the data within the data files to truncate their size. It useful only if you've done a lot of deletes and want to free up that disk space (RTFA).

    "vacuum buffer" is the amount of RAM vacuum will use while running. You can adjust it by editing postgresql.org. The more memory you give it, the faster it will run. That's all. It is not something you can overflow.

    --
    ___
    If you think big enough, you'll never have to do it.
  36. Re:Why I'd rather not use PostgreSQL by routerguy666 · · Score: 2, Informative

    Clearly if you think 300 graphic artists generate any serious write load on a db, your idea of system load is vastly different than that of the parent. Also he stated that vaccum sucks because of the risk of data loss, not the inconvience of having to run it at all.

  37. Re:Why I'd rather not use PostgreSQL by jadavis · · Score: 2, Informative

    I believe you're referring to "max_fsm_pages". That can, and should, be adjusted. If you leave that parameter at a reasonable level, and vacuum at reasonable intervals, it shouldn't be a problem.

    For any high performance database task, you shouldn't expect 100% autotuning.

    --
    Social scientists are inspired by theories; scientists are humbled by facts.
  38. Top 5 reasons not to not look at Postgres by sk999 · · Score: 3, Interesting
    Many years ago we looked at Postgres, and the developer at the time said that "he would not trust his payroll to it."

    The database has improved a lot since then, and I currently support two Postgres databases, one on Linux and one on IRIX, both running in mission-critical situations. What that means is that if either one fails, I get phone calls in the middle of the night with complaints. In over 6 years, I have not fielded one phone call attributable to Postgres itself.

    None of the issues raised in the article was even remotely a factor in my choice of Postgres. A big (and ultimately deciding) factor in its favor is that it can be compiled and installed on a broad range of hardware and operating system versions. MySQL fared less well in this regard.

  39. Re:PostgreSQL is BSD licensed by tgl · · Score: 3, Insightful

    That's an utterly stupid argument, especially if you think it's a reason to contribute to mysql instead.

    There isn't any way for someone to "take control" of a BSD-licensed project. Sure, someone could use a BSD project as the base for a proprietary project, but that isn't going to discourage anybody else from working on the open original. We have in fact watched several proprietary "improvements" of postgres quietly tank over the years.

    On the other hand, MySQL AB own mysql lock stock and barrel, and only release GPL versions because they choose to. They could announce tomorrow that all their future versions will be high-price closed-source shrink-wrap, and no one could say boo to them about it. The difference from the postgres situation is that MySQL AB could take with them the vast majority of the existing development expertise for the code base. Postgres will continue as an open-source project no matter what any one company thinks about it --- you cannot say the same about mysql.

  40. Re:Why I'd rather not use PostgreSQL by Tablizer · · Score: 2, Insightful

    Bullshit again. Never ever seen that or even heard about it. Again, at my last job postgresql was part of a mission-critical application, and I've used it for a couple of projects before that too.

    Guys, guys, it may be that certain coding styles trigger issues that other coding styles don't. I've had that happen to me with other products. Syntax and coding techniques that I preferred just happened to bother that particular product while it worked fine for other styles. No product will please everybody.

  41. Reason number 6 by porkThreeWays · · Score: 4, Insightful

    Reason number 6 is the damnned Postgres zealots that feel the need to bash everyone else's database rather than promote their own. I use MySQL and Postgres on a regular basis. I'm proficient in both. And to the dismay of Postgres users everywhere, there are times which *gasp* MySQL is better suited. "Oh, you are probably a lame programmer and use it for trivial web stuff". Not true! I look at a project and each databases strenths. It has nothing to do with the seriousness of an application. When I was writing VoIP billing software, we'd sometimes see 4-5 million CDR's (call detail records) in a single day. Our first iteration actually used Postgres and choked on that many records. We had to make some compromises with MySQL. We had an additional field for Unix epoch time because of MySQL's lacking (at the time) date and time math. There was a tradeoff. It was deemed that having billing invoices generate in 5 seconds (as opposed to 5 minutes) was more important than programmer time. Welcome to the real world. Another project I had was for writing worker punchcard system. Six months of records only topped out at 50,000 records and we decided Postgres' procedural languages would be a great help to us. Lose the zealots and attitude and maybe you'll have a greater user base.

    --
    If an officer ever threatens to taze you, say you have a pacemaker.
    1. Re:Reason number 6 by jadavis · · Score: 5, Informative

      My reply was apt. The parent said that there was little reason to switch, I gave some reasons. I stated a fact (that MySQL thinks Feb 31st is a date), which is not bashing. It looks like bashing because it makes MySQL look bad.

      I don't have a problem with other databases. The only database that, to me, stands out as particularly bad is MySQL. That's because their marketing deceives many people.

      Someone may see:
      1. "MySQL supports strict SQL compliance mode"
      2. "MySQL is easy to use from the default install"
      3. "MySQL is screaming fast"
      4. "MySQL has transactions"
      5. "MySQL has more applications written for it than PostgreSQL"

      But...
      #1 conflicts with #2 and #5 because strict is off by default, and there are fewer "MySQL Strict Mode" apps than PostgreSQL apps.
      #2 conflicts with #4 because the default install and CREATE TABLE create MyISAM tables which do not support transactions.
      #3 conflicts with #4 because the "screaming fast" reputation is from MyISAM tables. InnoDB is somewhat similar in performance to PostgreSQL.

      Everything about MySQL pigeonholes you into a subset of the features that MySQL AB advertises, and then makes it as difficult as possible to roam between those features. In MySQL, if you need to change the type of a table, for instance if you want transactions, you can't do that without disrupting running applications. You need to pause and resume all the applications accessing that table.

      Compare to PostgreSQL, if you need to, for example, change the disk that a table is stored on (of course PostgreSQL doesn't have different table types), you can make all the necessary DDL modifications in a transaction-safe way, and the application will never know the difference.

      I know MySQL has uses. I use it (sparingly). Slashdot uses it, for good reasons I'm sure. But "has it's uses" does not mean "immune from criticism".

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    2. Re:Reason number 6 by dj-nix · · Score: 5, Interesting

      Well, thats funny, because I also have had to write VoIP billing software, and am currently writing IP traffic rating and billing software. When I first started this type of business 5 years ago it was with MySQL, but I was frequently both crashing MySQL and getting junk data in my tables (The biggest problem being invalid dates!) When I started searching for a better option I tried a number of databases including FireBird and Postgresql but settled on Postgresql for 4 major reasons. 1) It has absolutely brilliant Date and Time handling, better even than Oracle. 2) It has native INET support which allows easy manipulation, sorting and searching of IP addresses. 3) It has SUB SELECT support which allowed me to reduce my application code a lot, by making the DB do the work (Always a good tradeoff in my opinion) 4) It has VIEW support which allowed me to generate some "simple" views of the data including some summaries which allowed the management to play to their hearts content with MS Access (As a frontend to PG) without having to understand the "real" data layout.
      Of course since then I have discovered many more things to love about Postgresql, including triggers and stored procedures etc (To be fair, MySQL has some of these features now, but did not at that time)
      Just to be clear my first Postgresql app handled ~5 million VoIP records per day on a single CPU, single disk desktop class machine and the only time I have EVER had Postgresql crash was due to a bad ram chip in server! Conversely, I can't count the number of time I and my customers have lost data with MySQL.

  42. Re:Crystal Reports by SpasticWeasel · · Score: 3, Informative

    Crystal Reports was designed and developed by some of the most sadistic and shit headed sons of bitches ever. Any developer with any experience using Crystal Reports despises it, loathes it, has fantasies of strangling the ignorant shit headded fucktards that created it. If you change the data source for a report, view, stored proc, etc., even though the added column for example is never used in the report, it will break the report because the dipshits save the definition in the report itself. Verify the database and "Fix Up The Report"? or get cryptic errors. Saves the connection information too. Can't switch between SQL Server authentication and Windows Authentication because the ignorant bastards hard code the connection information in the report at design time. FUCK Crystal Reports. I would rather hand code PostScript to output reports before I would ever use this stinking pile of bloody stool ever again.

    --
    No sooner do I get over one, then you put a better one right next to me. Bastards.
  43. Re:postgresql bites because by fingusernames · · Score: 2, Informative

    Have you ever used it? Ever? The following (edited) transcript is from an old 7.4 installation.

    foo=# create table JoelPtIsAnIdiot ( idiot varchar );
    foo=# \dt
      public | joelptisanidiot | table | foo

    foo=# create table "JoelPtIsAnIdiot" ( idiot varchar );
    foo=# \dt
      public | JoelPtIsAnIdiot | table | foo
      public | joelptisanidiot | table | foo

    Lessons: PostgreSQL (or rather psql I am sure) defaults to wrapping to lower case. It preserves case with quotes. And its namespace is case sensitive, hence the two tables existing simultaneously. No hideous ALL_UPPER_CASE identifiers, and no terrifying hoops unless one fears quotes.

    Larry

  44. A few more reasons by jdoeii · · Score: 4, Insightful
    VACUUM is a pain. It's true that VACUUM is annoying, but later releases (especially 8.0 and 8.1) make VACUUM much more tolerable;

    Vacuum kills performance. Some uses maybe OK with loosing 50% or more while VACUUM runs. In some uses it's unacceptable. In our case (a lot of inserts with majority of selects going for the newly inserted records) performance degrades within 6-8 hours after running VACUUM & friends. VACUUM takes ~20 minutes to complete which is completely unacceptable during the day and we can't delay it till night.

    No, AUTOVACUUM is not an answer because it kicks in unexpectedly and makes random queries run unexpectedly slow at unexpected times. Usual VACUUM makes all queries run slow at predetermined time. Not a very appealing choice.

    More reasons:
    • No memory management. For example, here is 1GB database on a dedicated host with 2GB of RAM. PG should suck the while DB into RAM and run selects from there, right? Wrong. PG is extremely frugal about memory management. It caches the last few results, but otherwise goes to disk for data even if there is anough RAM to cache the whole DB. The PG developers keep saying that it's the job for the OS. Now, which OS should we use then? FreeBSD, Linux, Windows? Which one?
    • Forever broken COUNT(). Although MIN & MAX were fixed in the latest release, COUNT() is still broken and there is no fixing in sight. Yes, I beieve 10 seconds execution time for count() on a table with just a few million records qualifies it as a broken feature.
    • Of course, the query optimizer/planner can be improved, but that's understandable and can be applied to pretty much any DBMS
    1. Re:A few more reasons by mw · · Score: 3, Informative

      "Forever broken COUNT(). Although MIN & MAX were fixed in the latest release, COUNT() is still broken and there is no fixing in sight. Yes, I beieve 10 seconds execution time for count() on a table with just a few million records qualifies it as a broken feature."

      You know that count() does full table scans in MySQL too when you use InnoDB? And for MyISAM the result is simply wrong while updating.

      "No memory management. For example, here is 1GB database on a dedicated host with 2GB of RAM. PG should suck the while DB into RAM and run selects from there, right? Wrong. PG is extremely frugal about memory management. It caches the last few results, but otherwise goes to disk for data even if there is anough RAM to cache the whole DB. The PG developers keep saying that it's the job for the OS. Now, which OS should we use then? FreeBSD, Linux, Windows? Which one?"

      That's right. Postgres requires that you specify how much memory it should use. As for every complex program, it requires some skill.

  45. Avoidance through Ignorance by GISGEOLOGYGEEK · · Score: 3, Informative

    Most people avoid Postgres because they are totally ignorant and are going with the popular flow no matter how ugly it is. They've jumped on the MySQL bandwagon with no regard for what they are missing.

    Heck do you want ignorance? ... I know one dumbass who spent $8000 for SQLServer based on a lie from the Microsoft salesman who told the dumbass that Postgres can not in any way handle Triggers! The fool couldn't be bothered to ask me or even to spend 2 minutes at postgres.org. Then there's other people who think your shop has to have the big name software or else you won't have any credibility with your clients. Hmmm ... have smart clients who get from you a cost effective and powerful product at a good price ... or have stupid clients who's money passes from you to the Database salesmen, leaving less for you. Which do you prefer?

    I haven't seen much about the windows world in this thread ... so here's my 2cents.

    I am not proficient in Linux. It took me two weeks of spare time to get postgres with the PostGIS spatial engine up and running properly. The pathetic typos in the configuration scripts, the dumbass instructions that contradicted the contents of the files they described ... it was a nightmare, no wonder people didnt use it.

    Then, about 1.5 years ago, a Windows installer came out for Postgres and PostGIS and it all changed.

    Literally 5 minutes later I was adding data to my spatial database and learning how to use the powerful spatial query functions.

    Sure MySQL does have some brutally weak spatial abilities, but its a joke compared to what PostGIS can do.

    Suddenly Windows users got to make the equivalent of an ArcSDE backend for their UMN MapServer websites, instead of spending $50,000 on ArcIMS with Oracle / ArcSDE. Heck I can build a few such sites for less than what the software costs to use the ESRI / Oracle crap.

    The moral of my story and main reason for people avoiding the current, powerful, fast, spatially enabled postgresql is that people are stupid. Disagree? ... remember that you are the people.

    --
    George Bush + Linux = "I will not let information get in the way of the fight against Windows"
    1. Re:Avoidance through Ignorance by ensignyu · · Score: 3, Insightful

      A small change:

      "Most people avoid Linux because they are totally ignorant and are going with the popular flow no matter how ugly it is. They've jumped on the Windows bandwagon with no regard for what they are missing."

      I think that you, as someone not proficient in Linux, should at least appreciate that some things are a pain in the ass to learn, even if there are considerable benefits. Don't be so quick to judge people who haven't adopted your favorite database package or OS or seafood dish.

  46. Re:Why I'd rather not use PostgreSQL by Matt+Perry · · Score: 3, Insightful
    Vacuum is asinine. Any command that needs to be run periodically under threat of complete and total data corruption should not be. That's right. Only PostgreSQL makes you vacuum or else your transaction ids overflow. This is modern?
    Vacuuming is just a form of garbage collection. It's a byproduct of how Postgres is designed to handle transactions. Until recently, users have had to handle this housekeeping function manually, a requirement which has scared people away. However, for the most part vacuuming isn't something that you should have to worry about any more. As of Postgres 8.1 autovacuum can be enabled which handles everything automatically.

    Here is a little background on why vacuuming is used:

    When a user starts a transaction to a database the database will show data that was valid as of the start of the transaction. So if I issue a select that takes some time to return results and another user updates rows that I would be selecting after I issue my select, I will only see data that was valid at the time of my select rather than the newly updated data.

    When that other user updated a row I was selecting from, a new row is inserted (or written to a previously deleted row). Any new transactions that select this row will get the new row rather than the old one my long-running transaction is still seeing. Once my transaction is complete, then the row with the old data isn't needed any more because newer data is in another row. This is called a non-overwriting storage manager.

    What vacuum does is look for these unused rows. It goes through the tables in the background and sees if any transactions are using that data. If no transactions are using the row it marks them as free for the storage manager to write to. Future inserts can use that row to store data rather than adding to the end of the file. Vacuum doesn't move any data in this way. It's just marking rows that can be overwritten with new data. It's completely unobtrusive and a normal part of keeping the database running.

    Some databases take a different approach. For example, Oracle uses an overwriting storage manager. When you update a row the data in the row is physically overwritten. To handle transactions, Oracle keeps what it calls a REDO log. The REDO log is like a journal in a journaled filesystem. It keeps track of all changes to to the data in the database. Any transactions that were open before the update to a DB row will notice that the data was updated and will then look at the REDO log to see what the correct data should be for their transaction.

    I have heard that implementing an overwriting storage manager like Oracle has is very complicated, much more complicated than a non-overwriting storage manager like Postgres uses. I'm not a DB programmer so I don't know if that is true. I also heard a while back that the Postgres developers were investigating overwriting storage manager algorithms but I don't know what came of that.

    Now, back to vacuum. In Postgres there is "vacuum full" which will move data around. It is used to compact the datafile to remove the space that's marked as unused and shrink your datafile size. You should rarely, if ever, have to use this as your unused rows will be used by new inserts. At least "vacuum full" is easier than the Oracle equivilent which is:

    CREATE TABLE my_temp_table AS SELECT * FROM my_old_table;
    TRUNCATE TABLE my_old_table;
    INSERT INTO my_old_table SELECT * FROM my_temp_table;
    DROP my_temp_table;
    Again, "vacuum full" is rarely, if ever, needed. The Oracle equivilent would be more rare to need due to how Oracle's storage manager works.

    --
    Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
  47. Multi-Value Concurrency Control by mbirk · · Score: 2, Informative

    One of the great features of Postresql is Multi-Value Concurrency Control (MVCC). In a nutshell, readers never block: "querying a database each transaction sees a snapshot of data (a database version) as it was some time ago."

    If you have a single, long-running write transaction (e.g. a batch process), and many short-running read transactions (e.g. serving web requests), this works very well. When the batch process completes, readers "atomically" switch to the newly-committed version. This (drastically) simplifies the batch process, since you don't have to worry about readers blocking or seeing inconsistent state. (Things get more complex in the many-writers scenario, however.)

    I don't think MySQL has this feature. (Please correct me if I am wrong.)

  48. Sometimes the tool IS the problem by WebCowboy · · Score: 4, Insightful

    My point is that the tool is not always the problem. Now if C++'s integer arithmetic had an issue, that is another story, but the programmer simply was not good.

    No, the tool IS part of the problem in such cases. If the programmer was not that good at C then C was the wrong tool and thus part of the problem. The programmer should've taken the time to study up on C, or picked a different tool. There are times when the tool is not appropriate for the job--you probably shouldn't use C if you need to do heavy text processing and need to get the job done fast (use Perl instead), or if you are less experienced and want a language that supports sound object-oriented programming maybe try Python, etc.

    MySQL was not designed as a robust relational database, and its creators didn't seem to be intent on making it so, or else they'd have designed it differently. It was designed as a very quick and quite dirty SQL frontend/ISAM backend system to support small, informal databases (or so it seems): Basically, its heritage is to be like the old Ashton-Tate dBase but using SQL to query the tables. Since then it has lost that focus and now we have large websites storing millions of records in mySQL.

    MySQL is a great tool if used as intended, however it definitely IS a problem if your accounting system uses it for example. People started doing crap like that and complained about mySQL's lack of features, thus we have things tacked on like innoDB tables and such to add this robustness.

    PostgreSQL was not always as super-robust as it is now, and in its present form its source code is probably almost unrecognisable from 10 years ago, however its architecture was more sound and thought out from the start, as its heritage was as an academic project. Its challenge was not to add features as was the case with mySQL--PgSQL was designed for extensibility. PostgreSQL had to catch up in performance and stability, which it has done in spades.

    Personally, I always use UNIX timestamps (seconds since 1970). They can be directly added, sorted, and converted into any timezone, and its very portable. But thats just me. (Yes, UNIX timestamps do nothing before 1970, etc, etc).

    It seems somehow wrong that your business logic has to perform low-level validation of basic datatypes, and it is cumbersome and error-prone to deal with unrecognisable representations. Only the geekiest of geeks could tell me whether 1984293617 falls on a Thursday without runing it through some kind of conversion program (simple as that may be for a geek). What about people who point-and-click their way through some report designer--they're gonna have to deal with some giant integer in a column entitled "something-date". The other problem is that it is not very precise for some applications that need sub-second timestamp values.

    Personally, I like PostgreSQL because it accepts ISO standard formats, you don't need to do anything to convert timezones--you simply specify the time zone when you insert or query and it issmart enough to figure it out when you query fordatain Eastern time zone and it was inserted in Pacific timezone. Furthermore, it knows Feb 30 isn't valid, and knows when leap years occur, and can format the date in many different ways with simple built-in functions, can be accurate to the millisecond and won't crash and burn in 2038.

    FYI, I believe the "seconds since UNIX epoch" representation of date/time values is a SIGNED integer, so they are in fact good for earlier dates than 1970 (they are good to some time in late 1901 in fact). That is still a pretty limited range and why early systems didn't use that representation inmany cases (couldn't store birthdates for a lot of people who were still alive in the early 1970s becasue they were born before 1901). It is still a problem in some applications ad that is why 32-bit "UNIX-style" time is discouraged.

    I think it's a shame that people resort to such kludges without adequately lookig for more appropriate alternatives...but that's just me ;-)

    1. Re:Sometimes the tool IS the problem by AlecC · · Score: 2, Insightful

      MySQL was not designed as a robust relational database, and its creators didn't seem to be intent on making it so, or else they'd have designed it differently. It was designed as a very quick and quite dirty SQL frontend/ISAM backend system to support small, informal databases (or so it seems)

      On MySQL doing only "informal" databases, you have a point: it is not good on points like referential integrity. But on "small", I think you are unfair. It scales very well to very large numbers of records/gigabytes, and performs well when doing so. If your challenge is sheer numbers of records, MySQL is good. It is still OK if you have very few developers who understand the entire database and its constraints. If you have many tables with complex relationships and many developers, some of indifferent quality, you need a lot more enforcement than MySQL gives you.

      --
      Consciousness is an illusion caused by an excess of self consciousness.
    2. Re:Sometimes the tool IS the problem by hackstraw · · Score: 2, Funny

      Only the geekiest of geeks could tell me whether 1984293617 falls on a Thursday without runing it through some kind of conversion program (simple as that may be for a geek).

      $ ./gmt2localtime.pl 1984293617

      Wed Nov 17 03:40:17 2032

      $ cat gmt2localtime.pl
      #!/usr/bin/perl

      if (!@ARGV) {
          die "Usage: $0 timestamp\n".
                  "\n".
                  "converts a unix timestamp to localtime";
      }

      print scalar localtime($ARGV[0]), "\n";


      I guess only the geekiest of geeks have used Oracle.

      $ oerr 942
      Error 942 is: ORA-00942: table or view does not exist


      Now, tell me that less than the geekiest of geeks knows that November 18, 2032 is a Thursday. I would have to get out a serious calculator, or use much more than a one line perl script to figure it out.

  49. The History of PostgreSQL by mbirk · · Score: 2, Interesting

    For a better understanding of where PostgreSQL sits with respect to MySQL, it's worth reading the history of PostgreSQL on Wikipedia.

    The short story is, it has deep roots in academia. It was Michael Stonebraker's experimental, "post-relational" database. It had "advanced" features, relative to its precursor INGRES, some of which still remain (e.g. extensible types). (Others, like built-in storage and querying of time-series data, do not.) After the academic project was abandoned, two of Stonebraker's grad students ripped out some of the more esoteric (and unstable) features and added a real SQL parser.

    Anyway, I wasn't involved in any of the academic work. However, I was an early adopter in this transition period, circa 1995 (when it was called Postgres95). It was buggy, but it was very, very cool.

    I think when MySQL came along, Postgres still had not fully shed it's "academic" pedigree, and still was complex, quirky, and buggy. MySQL was light-weight and simple, and "just worked."

    I love PostgreSQL, use it daily, and have had no stability problems in the last five years. But, it was not quite the write DMBS and the right time.

  50. What an attitude by WebCowboy · · Score: 4, Insightful

    I can't be bothered to learn something new when it seems everything supports MySQL.

    I'm glad you don't work for me with that attitude. I'd rather work with someone who is interested in learning new things and will bring some creativity to the job. People of your mentality have to be careful they don't fall into the "false laziness" trap--using some tool or technique or techology because you are too lazy to learn something new, only to end up doing load of extra work to avoid the shortcomings of your inappropriate design choices. The result is scads of legacy code at higher layers of an application to handle things like datatype verification, basic referential integrity and so on.

    All the various different executables to do different tasks rather then one shell like MySQL, a permission system which seemed from my limited usage more perverse then MySQL's

    I've never found it to be a major struggle to use PostgreSQL, though being a more full-featured database it will naturally be a bit more complex to manage.
    I'm puzzled about the "all the various executables" part too, since many of them were invocable from the psql shell anyways. Also, it sounds like you've not lookded at PostgreSQL for awhile because its permissions system has undergone a lot of work--certainly it can be complex but it is very flexible and powerful, and honestly it gets rid of most excuses you had to execute all your database operations under the database superuser (or some other single user account) in your backend code.

    I have better things to do with my time, like write cool code that uses MySQL.

    You might want to examine how you used your time...if you had spent a few hours or a couple days learning something new for a change (like PostgreSQL) then it might've saved weeks or hours of frustration trying to use mySQL for too-complex tasks.

    MySQL might have grownup a lot in recent years, but at its heart it was meant for much more modest tasks, like storing guestbook entries, record collections, as a temporary datastore/embedded database, high-performance querying of relatively static ad/or non-critical data and so on.

    1. Re:What an attitude by koekepeer · · Score: 2, Interesting

      > > I can't be bothered to learn something new when it seems everything
      > > supports MySQL.
      >
      > I'm glad you don't work for me with that attitude. I'd rather work
      > with someone who is interested in learning new things and will bring
      > some creativity to the job. People of your mentality have to be careful
      > they don't fall into the "false laziness" trap--using some tool or
      > technique or techology because you are too lazy to learn something new,
      > only to end up doing load of extra work to avoid the shortcomings of your
      > inappropriate design choices. The result is scads of legacy code at higher
      > layers of an application to handle things like datatype verification, basic
      > referential integrity and so on.

      not to attack you, but i feel you are presenting the situation quite black and white. i had a similar talk with a friend the other night, who develops in MySQL/PHP in a very innovative and creative environment (art/new media).

      the gist of his response was something like "creativity exists *because* of limitations and boundaries. you need them to be forced to think outside the box" (loosely paraphrasing).

      "just getting the job done" is often a very important issue as well. if your company makes money by selling a product with a complex MySQL database and a PHP frontend that has been developed by someone else, it's a big big effort to change all that to Postgres and some more "up-to-date" scripting language like ruby... especially if you have to meet deadlines all the time. and i'm not even considering what other team members think of this sudden change.

      having said that, i'm all for google-like policies, where people can invest 20% of their time in coding hobby projects. in this way you can invest part of your time on learning new fun stuff, and enlarge the array of possible solutions to the problems you need to tackle in the future.

  51. Re:Why I'd rather not use PostgreSQL by johnjaydk · · Score: 2, Informative
    My use is real world and in reality, PostgreSQL is slow ...

    Fact: Out of the box (source install) it's slow. You need to configure/tune it to get performance.

    Fact: Good performance tuning info is hard to come by and the tuning takes some time

    Fact: Once you tune it right, it's blinding fast

    ... and a bit buggy.Nested parentheses in SQL can cause an engine crash.

    Newer seen it happen in 1.5 years produktion use.

    Hand-holding the query optimizer is not. Quite often, the optimizer gets the query plan wrong. Sending special commands to disable internal features is often the only resort.

    The optimizer has had a major overhaul recently. I'd think you like the results.

    Vacuum is a total non-issue. Nothing to see, move along.

    I've personally put together a pg server that holds a 160 gig base that is used as backend for customer self-service in a Telco. Every 15 minutes it get a load of updates from the company main (oracle) db so there is no shortage of writes.

    I'm currently (after the weekends upgrade party) on pg 8.1.3 and performance is blinding. Admin'ing that box is sooo boring it just chuncks away. Zero issues.

    --
    TCAP-Abort
  52. PostgreSQL is a grown-ups database by mrphewitt · · Score: 2, Interesting

    My take is that "mySQL" is a marketing wonks dream name, "postgreSQL" says difficult and geeky. PostgreSQL is also a grown up database and has a different target audience to mySQL aiming itself at the Oracle and DB2 market. mySQL is aiming at a different market. I examined the strengths and weaknesses of mySQL and PosgtreSQL when deciding which OS database to use for my business and chose PostgreSQL because of its better support for transactional processing and ACID. My current applications built on the rock of postgreSQL include a 250GB datawarehouse modelling the UK electricity market which is used by major players in that market. It has never gone wrong, performs with impressive speed and has never written a record incorrectly or returned an incorrect row. Without postgreSQL I wouldn't be in business. It is the best OS database out there and competes with many of the paid for databases very well.

  53. Re:Because Firebird is here by fok · · Score: 2, Interesting

    I converted my Delphi app from firebird to postgresql because of scalability problems. Serious scalability problems. Firebird is good, but not nearly as grate as PostgreSQL (as a database engine). It simply cannot work with tables holding a few million records (the server crawls). An almost direct conversion to PostgreSQL gave the app the speed it needed (and afterlife to the server).

    --
    \m/
  54. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion

  55. Ah, postgres 8! by OpCode42 · · Score: 2, Informative

    There are many reasons not to use postgres 7.

    Want to add a not null column with a default value? Thats 3 statements. Plus one to update the existing rows to the default value.

    Want to rename a column? Create the new column. Copy the data over. Copy any contraints. Update any forgein key contrainsts. Drop the old column. That's right, postgres 7 does not do RENAME on columns!

    Here's one that will catch you out :

    SELECT a.*, b.* from a;

    The default behaviour for postgres 7 is to join a and b automatically, giving you a potentially huge result set instead of warning that b does not have a from clause. Yes, you can turn this off, but having it as default behaviour? Insanity. Fine if your statements are always 100% correct, but if there's a novice developer on your team who misses things like this, expect trouble instead of a helpful error.

    I could go on. Glad to see that version 8 is a big improvement.

  56. why I don't use postgresql by Squeezer · · Score: 2, Insightful

    with mysql, when you upgrade between major releases, you just compile and install it and keep on truckin'

    with postgresql you have to run pg_dumpall, and then restore it after upgrading to the next major version. which is extremely gay, and half the time it doesn't work, or doesn't work according to the postgresql docs, or sometimes loads the tables but not the users or vice versa. thats stupid and is what keeps me from using postgresql.

    --
    Does the name Pavlov ring a bell?
  57. My reason - upgrading woes by ebvwfbw · · Score: 2, Insightful
    I have used Postgress off and on for about 15 years. At first it was the only serious free relational database alternative out there. Then it went through a number of owners, iterations, updates, going free and even went backwards for a while I'd argue.

    From time to time they change the structure of the database. This is toxic waste. If you are not aware of it and upgrade your system and postgre is updated, you will have to move the data to a machine that can still understand the old database, dump it and migrate it back in. This has kicked my ass more than once. It seems like it is always at the most inopportune time as well. Then there is the vacuum nonsense to deal with.

    With Mysql, I have never had this problem. The database just works regardless of an upgrade to the way they do things. It takes care of it. I don't recall one time where I had to dump and migrate my data, except from one machine to another. Usually I just move the files, even from platform to platform and they are still fine. In fact I have had mysql applications running for years without any intervention. It just works. I can't say that about Postgres, as well as Oracle.

  58. I WANT associates links by bill_mcgonigle · · Score: 2, Interesting
    Amazon offers just about every book under the sun, so posting a link to Amazon is not an example of editorial bias. Clearly nobody forces anybody to buy from Amazon, so the only potential effect is on Amazon customers. So, what kind of idiot would post an amazon link to Slashdot without an associates ID?

    Here are the possibilities:
    • Amazon keeps all the money
    • A fellow slashdotter gets a miniscule amount of money

    Now we have to ask, "who benefits by complaining about people posting links with associates ID's?" The obvious answer would be employees and/or stockholders of Amazon. Now we have potential bias.

    In fact, I'd argue Slashcode should parse Amazon URL's and add associate ID's for Slashdot if none already exist. That could potentially be a better revenue base than subscriptions.

    It's not like Amazon is going to lower its pricing if everybody on Slashdot refrains from the practice, so consider an associates link a sign of an intelligent poster.
    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  59. Garbage in, garbage out by WebCowboy · · Score: 2, Interesting

    When i have a programming project, i want my contractors to get the job done. They have specifications and functional requirements and they can be as creative with that as they want to be.

    [...]

    IT professionals are no longer the new surgeons. They're plumbers.

    Wow. Perhaps you are personally a fine person, but I bet as a boss people think you are a bit of a jerk.

    In my experience the result of this sort of work environment is often mediocre and sometimes disastrous, particularly in a "waterfall" project management environment. My comments don't relate excluseively to programmers, they include the people who write the specs and functional requirements--ESPECIALLY the latter, because poor design and planning can doom a project before one line of code is written. And as for programmers, I do not want them to be confrontational, but I fully expect them to be creative and make suggestions to improve upon a specification.

    Although a person can get lost in "creative" pursuits and mired in details that do not contribute to end goals, the opposite can happen too. Engineers and developers can pigeon-hole themselves into doing things a certain way, using certain tools. Sometimes you cannot avoid it because you are working with an existing system, but if you are developing from the ground up you should ALWAYS use some creativity.

    I expect professionalism, and something that will stand the test of time. And i pay them accordingly.

    Professionalism goes both ways you know. If you expect professionalism from your developers, then you should respect them as professionals, not deride them with opinions that they are just "plumbers" and "aren't paid for creativity". Just as is the case with open source coding, "many eyes make bugs shallow" in a specification, and when a programmer asks why it is the way it is and "wouldn't it work better this way" it can be very beneficial.

  60. Re:Why I choose MySQL... by wieck · · Score: 2, Insightful

    Ease of replication...MySQL is real easy to set up when it comes to replication, not only is it easy, but it's full featured...

    So MySQL replication does support a master to multiple slave setup where you can failover to one slave and the new master inherits all other slaves without the requirement of resynchronization. And when you later repair the original master, you can fail-back without significant downtime, right?

    I might have not looked at it for a long time, but last time I looked it only allowed to promote a slave to a single standalone database ... that's not a master in my book (it misses any slave). Also MySQL's replication being still statement based, some of the glorious new enterprise features like stored procedures and triggers simply screw up your full featured replication.

    I do admit, the Slony-I replication system has a lot of shortcomings, most of which are due to the original design goal of "being able to install on an existing, old Postgres version and use it to upgrade to newer ones". But that mostly affected the implementation, not the initial design of features.

    Jan

    --
    It takes a real man to ride a scooter ... what are you compensating for?
  61. Re:missing alternate indexes by RuneB · · Score: 2, Informative
    It is my understanding that you shouldn't need to run VACUUM very often if you are only doing INSERTs, just once every billion transactions or so.

    Perhaps you are thinking of the ANALYZE command (which can be done as part of VACUUM), which updates the optimizer's statistics for a table?

    --
    dtach - A tiny program that emulates the detach feat
  62. PostgreSQL date handling is far from perfect by lhoriman · · Score: 2, Interesting

    Anyone that lauds date handling in PostgreSQL should take a closer look at the wire protocol. Here's loadCalendar() in the JDBC driver:

    http://gborg.postgresql.org/cgi-bin/cvsweb.cgi/pgj dbc/org/postgresql/jdbc2/TimestampUtils.java?rev=1 .18;cvsroot=pgjdbc

    HORRID. Aside from being complicated and verbose, it changes format pretty dramatically depending, presumably, on how the server was built and what OS it runs on. Some years ago I found myself patching the damn thing because somehow the standard RPM on RedHat6.2 used yet another slightly different format.

    32-bit UNIX-style seconds-since-1970-GMT might be inadequate, but a 64-bit milliseconds-since-epoch is just fine and much, much more reliable. And if you really want to be guaranteed infinite future-proofing, send the number as a string.

    I moved to Firebird for a while, but now I use MySQL predominantly for one reason only - integrated, robust, proven database replication. When and if PGSQL catches up, I'll consider migrating back.

    Jeff Schnitzer