RE: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Peter Crowther
From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Sure we can argue about which DBMS has the fastest JOINs but nonetheless it remains that JOIN queries will always be computationally expensive compared to single table queries. Depends what you do with the results of those single table

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Chris Wareham
Jonathan Mast wrote: Perhaps the discussion should move back towards how Tomcat interacts with databases. It would be more on topic, but a well architected web application will have a data access layer that is not dependent on the Servlet API, both for testability and reusability. While a

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Peter Stavrinides
Wareham cware...@visitlondon.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, 23 January, 2009 12:45:58 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat Jonathan Mast wrote: Perhaps the discussion should move back towards how Tomcat interacts

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Leon Rosenberg
On Fri, Jan 23, 2009 at 11:45 AM, Chris Wareham cware...@visitlondon.com wrote: By it's very definition (see Codd or Date), an RDBMS should be capable of performing joins with good performance. MySQL often struggles to do so thanks to the poor optimiser, so you had to implement what should be

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Jim Cox
On Fri, Jan 23, 2009 at 6:23 AM, Leon Rosenberg rosenberg.l...@googlemail.com wrote: On Fri, Jan 23, 2009 at 11:45 AM, Chris Wareham cware...@visitlondon.com wrote: By it's very definition (see Codd or Date), an RDBMS should be capable of performing joins with good performance. MySQL

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Chris Wareham
Leon Rosenberg wrote: On Fri, Jan 23, 2009 at 11:45 AM, Chris Wareham cware...@visitlondon.com wrote: By it's very definition (see Codd or Date), an RDBMS should be capable of performing joins with good performance. MySQL often struggles to do so thanks to the poor optimiser, so you had to

RE: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Peter Crowther
Leon, it's rare for me to disagree with you, but... From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] For example if you need all orders by user with name Chris, you will ALWAYS be faster if you first retrieve the userid, and than the orders of the userid. ... I disagree and can

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Leon Rosenberg
On Fri, Jan 23, 2009 at 12:36 PM, Chris Wareham cware...@visitlondon.com wrote: Leon Rosenberg wrote: On Fri, Jan 23, 2009 at 11:45 AM, Chris Wareham cware...@visitlondon.com wrote: By it's very definition (see Codd or Date), an RDBMS should be capable of performing joins with good

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Chris Wareham
Leon Rosenberg wrote: On Fri, Jan 23, 2009 at 12:36 PM, Chris Wareham cware...@visitlondon.com wrote: So you perform two queries from the application layer? You are basically doing a join by hand - the cost of those two round trips to the database will lose to a single query with a join,

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Chris Wareham wrote: I am particularly wary of MySQL because of the way missing features have been disingenuously described as unnecessary, and broken features as the MySQL developers knowing better than everyone else. Not to pick a fight,

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Leon Rosenberg
On Fri, Jan 23, 2009 at 12:59 PM, Chris Wareham cware...@visitlondon.com wrote: Reread my last message, and take a look at the internals of any half decent RDBMS. Frequently accessed data will get cached in memory, and the cost of many joins will be less than the cost of a hash table lookup

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Chris Wareham
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Chris Wareham wrote: I am particularly wary of MySQL because of the way missing features have been disingenuously described as unnecessary, and broken features as the MySQL developers knowing better than everyone

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Chris Wareham
Leon Rosenberg wrote: On Fri, Jan 23, 2009 at 12:59 PM, Chris Wareham cware...@visitlondon.com wrote: Reread my last message, and take a look at the internals of any half decent RDBMS. Frequently accessed data will get cached in memory, and the cost of many joins will be less than the cost of a

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Chris Wareham wrote: By the way, if it's not static data your caching, how's your messaging system? Without one how are you going to maintain the integrity of your caches? Even with one, can you tolerate a race condition between the data

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Jonathan Mast
Perhaps I should explain more about how my rewrite sans JOINs works: The reports read from a log table with this schema: PK | ref_PK1 | ref_PK2 | ref_PK3 | start_time | stop_time Where ref_PK# is the primary key of another table. These 3 other tables are very shallow (row count 100). The log

Re: PostgreSQL vs MySQL with Tomcat

2009-01-23 Thread Terence M. Bandoian
As a general rule, it's been my experience with MySQL that well-designed queries on properly indexed tables yield good performance. There are, of course, exceptions to the rule where performance may be improved by moving a portion of a query into the application and times when the execution of a

Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Chris Wareham
Joseph Millet wrote: Hi all, in my opinion MySql as previously said is a lot easier to administrate, and more developer friendly than postgre - even if its process managements is far from being good (some single query may bring it down - as far as I could see so far using 5.1.22 and many

Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Jim Cox
When creating tables with referential integrity in MySQL you still get gems like, e.g.: mysql create table jimtest ( colA varchar(32) NOT NULL, CONSTRAINT fk1 FOREIGN KEY(colA) REFERENCES jimtest2(colA) ON DELETE CASCADE ); ERROR 1005 (HY000): Can't create table './test/jimtest.frm' (errno:

Re: PostgreSQL vs MySQL with Tomcat

2009-01-22 Thread Jonathan Mast
Perhaps the discussion should move back towards how Tomcat interacts with databases. This thread seems to be damning MySQL for not having super advanced features, some of which should perhaps not even be in the purview of the database layer, but more appropriately belong at the application layer

Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Terence M. Bandoian
said, I've found it to be straightforward to install and administer. If that contradicts your experience, then so be it. You're welcome to your own opinion. -Terence M. Bandoian Subject: Re: PostgreSQL vs MySQL with Tomcat From: Chris Wareham cware...@visitlondon.com Date: Tue, 20 Jan 2009 15

Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Joseph Millet
it to be straightforward to install and administer. If that contradicts your experience, then so be it. You're welcome to your own opinion. -Terence M. Bandoian Subject: Re: PostgreSQL vs MySQL with Tomcat From: Chris Wareham cware...@visitlondon.com Date: Tue, 20 Jan 2009 15:53:05 +

Re: PostgreSQL vs MySQL with Tomcat

2009-01-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rusty, Rusty Wright wrote: I think the biggest gripe I've had with mysql is the problem where I was violating a unique constraint and it was giving me some generic (completely useless) error; HY001 I think. I've always found the error messages

Re: PostgreSQL vs MySQL with Tomcat

2009-01-20 Thread Chris Wareham
Wow, this almost reads like a direct quote from MySQL marketing literature. Like marketing literature, it's not necessarily untruthful, but it does describe things selectively. Terence M. Bandoian wrote: I don't have a great deal of experience with Postgres but I have been using MySQL since the

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Peter Stavrinides
, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat It's a rewrite of an app I did awhile ago in php. I think the biggest gripe I've had with mysql is the problem where I was violating a unique constraint and it was giving me some generic (completely useless) error; HY001 I

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Ognjen Blagojevic
In our company we used MySQL and Postgres for several projects. Both DBMSs are mature and stable, and they are used worldwide for large-scale projects. Performance-wise we measured some differences, but they were not so big to notice them in the real-life loads. In other words, having some

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Kees de Kooter
the only really major difference I can think of is T-SQL stored procedures, which have no counterpart in Postgres. PostgreSQL does have support for stored procedures, you can even choose from 4 languages out of the box and 3 more from addons: http://www.postgresql.org/download/products/4.html.

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Peter Stavrinides
Users List users@tomcat.apache.org Sent: Monday, 19 January, 2009 13:24:54 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: PostgreSQL vs MySQL with Tomcat the only really major difference I can think of is T-SQL stored procedures, which have no counterpart in Postgres. PostgreSQL

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Terence M. Bandoian
I don't have a great deal of experience with Postgres but I have been using MySQL since the days of mSQL and have found it to be fast, reliable, easy to install on both Linux and Windows and straightforward to administer. It provides good support for the ANSI standard and the documentation is

Re: PostgreSQL vs MySQL with Tomcat

2009-01-19 Thread Alan Chaney
I stopped using MySQL when it was at version 4 because the transactional locking table (InnoDB) had different licensing restrictions than the rest of MySql (I'm not sure if this is true any longer.) We switched to Postgresql (of comparable price!) and basically found it well-documented,

Re: PostgreSQL vs MySQL with Tomcat

2009-01-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rusty, Rusty Wright wrote: I'm in the process of migrating a MySQL database to PostgrSQL. Is this to cool-off your DBA's ears? ;) Seriously, if you could explain why you've decided to switch, I think it would help a lot of readers understand some

Re: PostgreSQL vs MySQL with Tomcat

2009-01-17 Thread Rusty Wright
It's a rewrite of an app I did awhile ago in php. I think the biggest gripe I've had with mysql is the problem where I was violating a unique constraint and it was giving me some generic (completely useless) error; HY001 I think. In various ways, which I can't articulate, MySQL just feels to

Re: PostgreSQL vs MySQL with Tomcat

2009-01-16 Thread Ingmar Lötzsch
Some comments (and answers to Christopher and Rusty) on PostgreSQL: In 2004 our team decided to use PostgreSQL instead of the well-known MySQL (current version 4). The main reasons where - real referential integrity - real transactions - support for UTF-8 enoding - better compliance with the SQL

Re: PostgreSQL vs MySQL with Tomcat

2009-01-16 Thread Chris Wareham
Ken Bowen wrote: Hi all (especially Chris -- very informative long post today on Tomcat/MySQL): For a several reasons (including the apparent infinite default for connection timeout), I'm contemplating switching one or two projects from MySQL to PostgreSQL. I'd like to gather opinions on

Re: PostgreSQL vs MySQL with Tomcat

2009-01-16 Thread Rusty Wright
That may be true about the public schema being used when one isn't specified. But when I use their pgAdmin gui tool and open the query window and try to run the tiger sample from the Jailer tutorial it blows up on the table creates, saying: ERROR: no schema has been selected to create in

Re: PostgreSQL vs MySQL with Tomcat

2009-01-16 Thread Jim Cox
As far as schemas in Postgres go, a normal way to handle them is to create schema-specific users with an appropriately-set default schema, e.g. something like: CREATE SCHEMA company_a ; CREATE USER company_a_user PASSWORD 'foo' ; ALTER USER company_a_user SET search_path TO company_a, public

Re: PostgreSQL vs MySQL with Tomcat

2009-01-16 Thread Rusty Wright
Regarding MySQL's autoincrement type, it looks like PostgreSQL has something similar: http://www.postgresql.org/docs/8.3/interactive/datatype-numeric.html#DATATYPE-SERIAL I'm in the process of migrating a MySQL database to PostgrSQL. Christopher Schultz wrote: -BEGIN PGP SIGNED

Re: PostgreSQL vs MySQL with Tomcat

2009-01-15 Thread Jonathan Mast
Our organization has products backed by both databases and we are almost entirely shielded from the database details in Tomcat. I don't really see how it should matter in terms of Tomcat (or any Web container). I'm thinking this is more a Java issue than a Tomcat issue. The main differences

Re: PostgreSQL vs MySQL with Tomcat

2009-01-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, Ken Bowen wrote: Unfortunately, MySQL isn't really that tunable. On the other hand, MySQL requires very little in the way of tuning! This was my comment, and that's the gist I got from reading Zawodny's and Balling's High Performance MySQL

Re: PostgreSQL vs MySQL with Tomcat

2009-01-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, Jonathan Mast wrote: * Postgre has more features (sequences and triggers) but also an enormous amount of complexity * MySQL has much finer authorization control, but lacks some of the big-boy features such as triggers ** of course a

Re: PostgreSQL vs MySQL with Tomcat

2009-01-15 Thread Rusty Wright
I've found MySQL's error messages particularly worthless in some situations; I had a foreign constraint and it was giving me some generic error when I was violating that foreign constraint. Say MySQL around our DBA and steam starts coming out of his ears. The one warning I can think of with