Обсуждение: Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

Поиск
Список
Период
Сортировка

Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
Josh Berkus
Дата:
David,

Thanks for being considerate, thourough, and honest about your opinions.
Particulary that you didn't simple depart in a huff.

> 1) the MySQL docs are better (sorry - I found them easier to read, and
> more comprehensive; I had an easier time finding the answers I needed)

I can believe that.   MySQL AB has paid documentation writers; we don't.

> 2) there are more web pages devoted to MySQL (probably because it has a
> bit more market share)

Particularly among web developers.

> 3) there are more books on MySQL at the bookstore (I haven't had a
> chance to pick up Bruce's book yet; it might be all the book I'd ever
> need)

Bruce's book is out of date -- released in 1998.  I recommend Korry Douglas'
book instead, just because of its up-to-date nature (printed late 2002 or
early 2003).

> 4) we looked at MySQL first (we needed replication, and eRServer had not
> been open-sourced when we started looking)

I can't do anything about that, now can I?

> With regards to #1, I'd like to specifically mention tuning - the docs
> at http://www.postgresql.org/docs/7.3/static/runtime-config.html
> <http://www.postgresql.org/docs/7.3/static/runtime-config.html>  give a

Have you checked these pages?  They've been posted on this list numerous
times:
http://techdocs.postgresql.org
http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html

Also, the runtime docs are being improved in 7.4:
http://developer.postgresql.org/docs/postgres/runtime-config.html
... and I'm still working on more general "how to" text.

> "I guess my point is simply this: instead of saying: "okay we use
> default settings that will run on _old_ hardware too" we should go for a
> little script that creates a "still save but much better" config file.
> There's just no point in setting SHARED_BUFFERS to something like 16
> (what's the current default?) if the PC has >= 1 GB of RAM. Setting it
> to 8192 would still be save, but 512 times better...  ;-) (IIRC 8192
> would take 64 MB of RAM, which should be save if you leave the default
> MAX_CONNECTIONS.)"

You'll be interested to know that SHARED_BUFFERS are actually addressed in the
initdb script in 7.4.  However, may OSes have low limits on per-process
memory that requires the admin to modify the sysconf before postgresql.conf
can be adjusted properly.  This makes writing a multi-platform tuning script
a significant effort, and to date nobody who is complaining about it the
loudest has volunteered to do the work.

To reiterate my point above, PostgreSQL is a 100% volunteer Open Source
project.  MySQL is a commercial company which distributes its products via
Open Source licensing.  That makes some things easier for them than for us
(and vice-versa, of course).

> I also have to admit a bit of irritation reading this thread; there is a
> fair number of incorrect statements on this thread that, while not
> wrong, definately aren't right:

We've been working on this on the advocacy list .... that is, giving an
accurate listing of PostgreSQL features not posessed by MySQL (same for
Oracle and DB2 as well, MySQL is just easier to start becuase we don't have
to worry about being sued).   I'd appreciate it if you'd take an interest in
that document and revise anything which is innaccurate or perjorative.

Also, keep in mind that many members of the PostgreSQL community have "an axe
to grind" about MySQL.  This is not only because of MySQL's eclipsing us in
the popular press as "THE open source database"; it is also because prominent
individuals at MySQL AB, particularly Monty and David Axmark, have in the
past signaled their intent to rub out all other OSS databases, starting with
PostgreSQL.   While this says little about the MySQL community, it does make
members of our communty very touchy when the "M" word comes up.

I quote the rest of your debunking for the benefit of the readers on the
Advocacy list, with a couple of comments:

> "Speed depends on the nature of use and the complexity of queries.  If
> you are doing updates of related tables, ACID is of vital importance and
> MySQL doesn't provide it."
> MySQL has ACID in InnoDB. I've found that MySQL is actually very fast on
> complex queries w/InnoDB (six tables, 1 million rows, two of the joins
> are outer-joins. In fact, I can get InnoDB to be almost as fast as
> MyISAM. Complex updates are also very very fast. We have not tried
> flooding either database with dozens of complex statements from multiple
> clients; that's coming soon, and from what I've read, MySQL won't do too
> well.
>
> "using InnoDB tables (the only way to have foreign keys, transactions,
> and row level locking for MySQL) makes MySQL slower and adds complexity
> to tuning the database"
> Adding this: "innodb_flush_method=O_DSYNC" to the my.cnf made InnoDB as
> fast as MyISAM in our tests. It doesn't turn off disk flushing; it's
> just a flush method that might work better with different kernels and
> drives; it's one of those "play with this and see if it helps"
> parameters; there are lots of those in Postgres, it seems. There are 10
> variables for tuning InnoDB (and you don't have to tune for MyISAM, so
> it's actually a six-of-one, half-dozen-of-the-other). Setup between the
> two seems to be about the same.
>
> "PostgreSQL supports constraints. MySQL doesn't; programmers need to
> take care of that from the client side"
> Again, InnoDB supports constraints.

Really?  This is news.   We did some tests on constraints on InnoDB, and found
that while they parsed, they were not actually enforced.    Was our test in
error?

> "Transactions: We've been here before. Suffice to say, MySQL+InnoDB is
> almost there. Plain ol' MySQL doesn't have it, which tells you something
> about their philosophy towards database design."
> InnoDB supports transactions very nicely, has the equivalent of WAL, and
> one thing I really like: a tablespace (comprised of data files that can
> be spread around multiple hard drives), and in a month or so, InnoDB
> will support multiple tablespaces.

We'll have multiple tablespaces soon as well.  They didn't quite make it for
7.4, but will be in 7.5.

> To be fair, here are a few MySQL "bad-things" that weren't mentioned:
>
> 1) InnoDB can't do a hot-backup with the basic backup tools. To
> hot-backup an InnoDB database, you need to pay $450 US per database per
> year ($1150 per database perpetual) for a proprietary hot-backup tool
> 2) InnoDB can't do full-text searching.
> 3) I see alot more corrupt-database bugs on the MySQL lists (most are
> MyISAM, but a few InnoDB bugs pop up from time to time) - way more than
> I see on the Postgres lists.

This is consistent with MySQL's emphasis on speed and ease-of-use over
reliability; we have the opposite emphasis (see below).

> 4) There are some really cranky people on the MySQL lists; the Postgres
> lists seem to be much more effective (esp. with people like Tom Lane).
> Maybe it's because they get alot of dumb questions, as people unfamiliar
> with databases turn to MySQL first?

Possibly.  Also I think it's because of the poor organization of their mailing
lists; ours are clearly divided into particular topics and experienced
members politiely encourage toplicality.   Further, the participation by
major contributors on our lists is, from what I've heard, higher; this means
that complaintants have faith that their complaints will reach the eyes of
those actually responsible for the code.

> Maybe the Postgres community needs an anti-FUD individual or two; people
> that know both databases, and can provide the proper information for
> answering questions like this. A section in the docs would help as well.
> Yes, I know many of the people advocating Postgres do not want to
> compare themselves to MySQL (but rather to Oracle, Sybase, DB2, etc) ,
> but the volume of responses on a thread like this indicates that the
> comparison is going to happen regardless. Better to nip it in the bud
> quickly than let it go on over 3-4 days.

Would you care to volunteer?   We'd be glad to have you.

> One last observation: someone looking at both databases, reading those
> posts, might get a bad impression of Postgres based on the inconsistency
> and incorrectness of some of the statements made about MySQL. If a
> salesperson provides misinformation about a competitors product and you
> find out about it, that salesperson has most likely lost a customer.

Maybe.  Not that I'm saying that inaccurate propaganda is a good thing, but
that it seems so pervasive in the industry that I think people expect it.  We
trash MySQL; MySQL publishes 6-year-old PG vs. MySQL benchmarks; Oracle puts
down all Open Source databases based on MySQL's limitations; and MS SQL
Server publishes benchmarks based on MSSQL on a cluster vs. other DBs on
workstations.

> Anyway, I hope I haven't offended anyone - I'm not trying to troll or
> flame, but rather just give some constructive criticism from someone
> outside both the MySQL and Postgres camps.

Hmmm .... also, come to think about it, MySQL has done us a favor in some ways
by making our project take advocacy and user-friendliness seriously,
something we didn't always do.

--
Josh Berkus
Aglio Database Solutions
San Francisco

Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
"Nick Fankhauser"
Дата:
> Have you checked these pages?  They've been posted on this list numerous
> times:
> http://techdocs.postgresql.org
> http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
> http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
>

Josh- It would be great to have a link to those last two excellent resources
from the techdocs area- perhaps from the "optimizing" section in
http://techdocs.postgresql.org/oresources.php. Who should we suggest this
to? (I submitted these using the form in that area, but you may have better
connections.)

-Nick



Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
Josh Berkus
Дата:
Nick,

> Josh- It would be great to have a link to those last two excellent resources
> from the techdocs area- perhaps from the "optimizing" section in
> http://techdocs.postgresql.org/oresources.php. Who should we suggest this
> to? (I submitted these using the form in that area, but you may have better
> connections.)

This is my  responsibility;  I'll add it to the list.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
Robert Treat
Дата:
On Thu, 2003-10-09 at 14:14, Nick Fankhauser wrote:
> > Have you checked these pages?  They've been posted on this list numerous
> > times:
> > http://techdocs.postgresql.org
> > http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
> > http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
> >
>
> Josh- It would be great to have a link to those last two excellent resources
> from the techdocs area- perhaps from the "optimizing" section in
> http://techdocs.postgresql.org/oresources.php. Who should we suggest this
> to? (I submitted these using the form in that area, but you may have better
> connections.)
>

Unfortunately techdocs is becoming more and more a bastard child since
no one can seem to agree on and actually implement a solution to it's
current woes. I've (quietly) complained about new articles getting
written by the community and posted to sites other than techdocs since I
think it makes it harder for folks to find useful information...

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
"Joshua D. Drake"
Дата:
Hello,

  One of the other problems with techdocs is that it is way to top level
heavy. There is a ton of information that is on the front page that
really shouldn't be. IMHO:

There shouldn't be a separate box for JDBC... There should be one that
is a link to an intefaces page. The interfaces page should have
subsequent information about JDBC/Perl/Python/etc...

As much as I personally appreciate the Online Books box, it should be
one link that say Documentation. That link should open
a page that has resources for the books, and other online docs as well
as a link to an articles page.

etc...

Sincerely,

Joshua Drake


Robert Treat wrote:

>On Thu, 2003-10-09 at 14:14, Nick Fankhauser wrote:
>
>
>>>Have you checked these pages?  They've been posted on this list numerous
>>>times:
>>>http://techdocs.postgresql.org
>>>http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
>>>http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
>>>
>>>
>>>
>>Josh- It would be great to have a link to those last two excellent resources
>>from the techdocs area- perhaps from the "optimizing" section in
>>http://techdocs.postgresql.org/oresources.php. Who should we suggest this
>>to? (I submitted these using the form in that area, but you may have better
>>connections.)
>>
>>
>>
>
>Unfortunately techdocs is becoming more and more a bastard child since
>no one can seem to agree on and actually implement a solution to it's
>current woes. I've (quietly) complained about new articles getting
>written by the community and posted to sites other than techdocs since I
>think it makes it harder for folks to find useful information...
>
>Robert Treat
>
>

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-222-2783 - jd@commandprompt.com - http://www.commandprompt.com
Editor-N-Chief - PostgreSQl.Org - http://www.postgresql.org



Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
"scott.marlowe"
Дата:
On Thu, 9 Oct 2003, Josh Berkus wrote:

> David Griffiths wrote:
> > With regards to #1, I'd like to specifically mention tuning - the docs
> > at http://www.postgresql.org/docs/7.3/static/runtime-config.html
> > <http://www.postgresql.org/docs/7.3/static/runtime-config.html>  give a
>
> Have you checked these pages?  They've been posted on this list numerous
> times:
> http://techdocs.postgresql.org
> http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
> http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
>
> Also, the runtime docs are being improved in 7.4:
> http://developer.postgresql.org/docs/postgres/runtime-config.html
> ... and I'm still working on more general "how to" text.

any chance of getting the perf.html file from varlena folded into the main
documentation tree somewhere?  it's a great document, and it would
definitely help if the tuning section of the main docs said "For a more
thorough examination of postgresql tuning see this:" and pointed to it.


Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
Josh Berkus
Дата:
Scott,

> any chance of getting the perf.html file from varlena folded into the main
> documentation tree somewhere?  it's a great document, and it would
> definitely help if the tuning section of the main docs said "For a more
> thorough examination of postgresql tuning see this:" and pointed to it.

Actually, I'm working on that this weekend.

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology     josh@agliodbs.com
    and data management solutions     (415) 565-7293
   for law firms, small businesses      fax 621-2533
    and non-profit organizations.     San Francisco


Re: [PERFORM] OFFTOPIC: PostgreSQL vs MySQL

От
Josh Berkus
Дата:
Josh,

The plan is to re-design techdocs based on Bricolage, allowing writers to
contribute easier.   However, we got as far as installing Bric on David
Fetter's test server, and haven't worked on setting up templates yet.

Too many things.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco