Article on the future of Python

Littlefield, Tyler tyler at tysdomain.com
Fri Sep 28 01:20:24 EDT 2012


On 9/27/2012 10:37 PM, Chris Angelico wrote:
> On Fri, Sep 28, 2012 at 2:12 PM, Greg Donald <gdonald at gmail.com> wrote:
>> On Thu, Sep 27, 2012 at 10:37 PM, Wayne Werner <wayne at waynewerner.com> wrote:
>>> the only advice I can give on that is
>>> just learn to use both.
>> I find there's little to lose in having experience with both.
>>
>> Most every good web framework out there supports lots of different
>> databases through generic ORM layers.. so flipping back and forth to
>> see which database is better for your particular app and workload is
>> trivial.

I plan to do that, just so I have both. I've had the experience of mysql, so I guess postgresql is up next. I was just really curious why so many people prefered it. Perhaps off topic (actually really off topic), but if I were to dump my tables from mysql out into flat-files, does postgresql use the same basic structure? IIRC there's a sql98 standard or something like that.

  Learning both is good, if for no reason than that learning more tends
to be advantageous.

As Greg said in his other post, PGSQL is a completely open source
project. That's a significant point imho. Other points to consider:

* MySQL is designed for dynamic web sites, with lots of reading and
not too much writing. Its row and table locking system is pretty
rudimentary, and it's quite easy for performance to suffer really
badly if you don't think about it. But if your needs are simple, MySQL
is probably enough. PostgreSQL uses MVCC to avoid locks in many cases.
You can happily read from a row while it's being updated; you'll be
unaware of the update until it's committed.

* Postgres has solid support for advanced features like replication. I
don't know how good MySQL's replication is, never tried it. Can't say.
This might be completely insignificant.

* The default MySQL engine, MyISAM, doesn't do proper transaction
logging etc. InnoDB is better for this, but the internal tables (where
your database *structure* is maintained) are MyISAM. This imposes a
definite risk.

You've lost me here; there are two different engines. From what I got from your post, innoDB just essentially wraps MyIsam with some pretty (or apparently not so pretty) locking stuff to help with transactions?

  * Both engines have good support in popular languages, including
(dragging this back on topic, kicking and screaming) Python.

For further details, poke around on the web; I'm sure you'll find
plenty of good blog posts etc. But as for me and my house, we will
have Postgres serve us.


Will do, thanks for all the feedback (both on and off list). I'm not a huge database person; I've never really played around with much of it since there's a lot more to understand and I can't just mess with it like any other language, so I was unaware of a lot, and still am in terms of performance. I've obviously seen a ton of blog posts talking about the differences, but they tend to dive into the inner mechanics, something which I don't understand all that well.
PS: Someone mentioned my messages were not indented properly; is this still the case? Apparently thunderbird allows ctrl+right bracket to outdent, so I assume my messages should be the outer ones with others being indented farther.

  ChrisA



-- 
Take care,
Ty
http://tds-solutions.net
The aspen project: a barebones light-weight mud engine:
http://code.google.com/p/aspenmud
He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120927/72bf7dc1/attachment.html>


More information about the Python-list mailing list