On Tue, Apr 20, 2010 at 12:28 PM, Fernando Duran <span dir="ltr"><<a href="mailto:liberosec@yahoo.ca">liberosec@yahoo.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
For some applications, PostgreSQL is just too slow (e.g. high traffic Drupal sites). Not a realistic option.<br></blockquote>
<br>
</div>"Postgress is slow" for me is just a (now) unsupported claim that comes from the past. All the benchmarks etc I read regarding mysql vs pg performance vary a lot depending on configurations, hardware, data set, types of queries etc so I don't think you can say that all over the board pg is slower. I don't see people migrating pg -> mysql but I see the opposite. I don't hear clients complaining about pg but I hear them complaining about mysql. It's possible that I'm suffering from confirmation bias.<br>
</blockquote><div><br>Here are benchmarks that we conducted in-house. It is not on a hypothetical TPC-X type benchmark, it is on a real use case (Drupal CMS, on the same hardware, out of the box parameters).<br><br><a href="http://2bits.com/articles/benchmarking-postgresql-vs-mysql-performance-using-drupal-5x.html">http://2bits.com/articles/benchmarking-postgresql-vs-mysql-performance-using-drupal-5x.html</a><br>
<br>After I published this, there were the usual screams of "but it is not tuned", ...etc.<br>I worked with one person who decided to go beyond screaming and offered PostgreSQL tuning assistance. We did tune many things over a week, with little difference in the end. We did not take it further than that.<br>
<br>I am not saying PostgreSQL is generally slow, but rather: slow for particular workloads (CMS web application).<br><br>Another case is a client who decided to build their web site on PostgreSQL "because they use pg for other applications in-house", only to have 6 second page loads. Not all of the issues with this site are PostgreSQL, but it was definitely a major contributor to the slowness.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For a typical Drupal / PHP app it may very well be that pg is slower, that's fine. I'll trade marginal speed for data integrity almost anytime and I can be easily convinced that in some cases (like a web forum) you may want the opposite trade-off.<br>
<br>
The "not a realistic option": there are many high-traffic web sites that use pg: <a href="http://imdb.com" target="_blank">imdb.com</a>, <a href="http://cdbaby.com" target="_blank">cdbaby.com</a> etc, so that's just not true.<br>
</blockquote><div><br>True. <br><br>If you are writing custom code from scratch you can do almost anything with the tools you like.<br><br>For example, Twitter started with Ruby on Rails and it did not scale for them. They replaced the guts of the site with Scala, a JVM language, and wrote their own.<br>
<br>But most web sites want to tack on the long tail of the ecosystem (modules, ...etc.), rather than write their own. In which case, they will use whatever is most used, for better or worse ...<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
We have this discussion every year within Drupal. We do support both MySQL and PostgreSQL (and sqlite lately) in core. Contributed modules have sparse support for PostgreSQL though.<br><br>
We then have people come and preach virtues of PostgreSQL (free, capable, ...etc.) and all that, but in the end no one is willing to step in and do the work needed. We have about one maintainer that comes in does some work and then disappear and PostgreSQL is left in the lurch.<br>
</blockquote>
<br>
</div>Agreed. It may not be worth it to support pg in drupal or other apps.<br></blockquote><div><br>Which is sad, because PostgreSQL is capable and free. It should be better than that, but there is a lack of interest / lack of contributions from the PostgreSQL community for one reason or the other.<br>
<br>This is really my lament: lack of hands to do the job, not the product itself ...<br><br>In the meantime, you see Microsoft working on getting their SQL Server into Drupal, so they gain a piece of the action, and Linux does not eat their lunch in that space.<br>
<br><a href="http://drupal.org/project/sqlsrv">http://drupal.org/project/sqlsrv</a><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
We hear this speech of "PostgreSQL is better, MySQL is crap" too often, but when it comes to people putting their code where their mouth is, the reality is different.<br></blockquote>
<br>
</div>Like somebody said, this is like "we keep hearing about Linux is better, Windows is crap", perhaps there's some truth in it? but seriously, instead of listening to sides of a "war", I try to listen to experienced and practical people who have been on both sides, and in the case pg pg vs mysql these people seem to agree that in general pg > mysql. </blockquote>
<div><br>"In general" is all good, but not the entire picture.<br><br>I used PostgreSQL where it really shines: e.g. an ERP application that preserves data integrity, with closer number of writes as reads, and a large number of users is not the issue.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Usually the people defending mysql haven't used that much pg, same as with Windows/Linux so I can see a parallel ("Oh no, can it be true that I'm on the dark side?" <a href="http://www.youtube.com/watch?v=OpZ8EkK3eWY" target="_blank">http://www.youtube.com/watch?v=OpZ8EkK3eWY</a> ).<br>
<div class="im"><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
Would be great to have this discussion at the KWLUG meeting on May 3rd as part of the MySQL presentation.<br></blockquote>
<br>
</div>Yes, I'll bring my "just say no to mysql" t-shirts :-)<br></blockquote><div><br>:-)<br><br>Instead of bashing, we need to have an informed and intelligent discussion with use case and facts, not just an argument of "X is better than Y". We need to qualify where X is a better fit and where Y is better. <br>
<br>Blanket statements are not helpful.<br></div></div>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>