PostgreSQL, MySQL or SQLite

04 April 2004   9 comments   Linux

http://www.hwaci.com/sw/sqlite/speed.html

Powered by Fusion×

I use PostgreSQL a lot but these benchmarking results surprise me. MySQL is often much faster than PostgreSQL and SQLLite is several times faster than MySQL.

What matters to me is how fast they work with Python, or in particular Zope. I need to make my own benchmark of MySQL and PostgreSQL with Zope and all the various database adapters.

The reason I moved from MySQL to PostgreSQL was partly because PostgreSQL has more enterprise features and that my colleges use PostgreSQL. But I suspect that for many of my projects I never even use these features.

Then I also found this from a Zope mailing list:

>The speed comparisions with PostgreSQL are very much an apples vs. fish
>sort of thing: the pgsql server was not tuned at all, and does a whole
>lot more that was never tested, such as multi-user writer access.

Comments

Anonymous
I'd take that with as much seriousness as someone on a postgresql list talking about the speed of the ZODB...
Anonymous
'speed'? 'zodb'? ;)
Anonymous
Try using the mysql 'innodb' engine instead of myisam.. you'll see a performance difference (see mysql.com for details on why they are different).
Anonymous
I should've added to the previous comment - this will compare properly to postgresql. comparing myisam tables to postgresql won't tell you anything - they are completely different.

the innodb engine on the other hand supports row level locking which means count(*) type queries can't use the table metadata (like a myisam table can).
code43
The post is on target. For most projects, one should concentrate on the code more than the data persistance issues. For speed and convenience, SQLite takes the cake. To concentrate on Python code, one could for example use y_serial http://yserial.sourceforge.net which has an elegant interface for quick development.
dude
If you benchmarked your postgresql install out of the box, yes, it's going to have horrid scores. You've got to change the out of the box settings and tune it.
Winter
Please keep thowring these posts up they help tons.
Ella
Times are cahngnig for the better if I can get this online!
Leandro
I wonder how ill informed some of ðe commenters can be.

Ðe consensus from real hackers is ðat code matters much leß ðan data acceß:

‘…git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I'm a huge proponent of designing your code around the data, rather than the other way around, and I think it's one of the reasons git has been fairly successful […] I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.’ TORVALDS, Linus, 2006 jul 27 16h 41min 20s UTC, http://article.gmane.org/gmane.comp.version-control.git/24298

‘Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious.’ BROOKS JR, Fred. P. Ten pounds in a five-pound sack: Representation is the essence of programming, in The Mythical Man-Month: Essays on software engineering. 1st. ed. Reading, MA, USA: Addison-Wesley, 1975; cap. 9, pp. 102–3; ISBN 0-201-00650-2.

Ðat said, even in performance SQLite or MySQL cannot even compare to PostgreSQL in any but ðe most simplistic benchmark. Anyþing; involving; concurrency, high loads or volumes will bring boþ SQLite and MySQL to ðeir knees.
Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
Challenge Osama with scimitar or sword 02 April 2004
Next:
XHTML, HTML and CSS compressor 07 April 2004
Related:
How do log ALL PostgresSQL SQL happening 20 July 2015
Benchmarking Autocompeter 12 April 2015
Fastest database for Tornado 09 October 2013
django-fancy-cache with or without stats 11 March 2013
Postgres collation errors on CITEXT fields when upgrading to 9.1 21 May 2012
Connecting with psycopg2 without a username and password 24 February 2011
Optimization of getting random rows out of a PostgreSQL in Django 23 February 2011
Fastest "boolean SQL queries" possible with Django 14 January 2011
Local Django development with Nginx 11 October 2010
UPPER vs. ILIKE 19 April 2010