pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig James <craig_james@emolecules.com>
To: pgsql-performance@postgresql.org
Subject: Re: Thousands of tables versus on table?
Date: Wed, 06 Jun 2007 09:23:53 -0700
Message-ID: <4666DF99.3010809@emolecules.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706051507120.24361@asgard.lang.hm>
References: <C289C6B1.A63%tandrews@soliantconsulting.com>
	<1180980943.31471.322.camel@archimedes>
	<46645DD9.7030805@soliantconsulting.com>
	<877iqjmro5.fsf@oxford.xeocode.com>
	<46647427.4030103@g2switchworks.com>
	<Pine.LNX.4.64.0706041631490.11737@asgard.lang.hm>
	<466593E5.1010904@g2switchworks.com>
	<87sl96z0wf.fsf@oxford.xeocode.com>
	<Pine.LNX.4.64.0706051325500.24361@asgard.lang.hm>
	<10525.1181080765@sss.pgh.pa.us>
	<Pine.LNX.4.64.0706051507120.24361@asgard.lang.hm>

david@lang.hm wrote:
> various people (not database experts) are pushing to install Oracle 
> cluster so that they can move all of these to one table with a 
> customerID column.

They're blowing smoke if they think Oracle can do this.  One of my applications had this exact same problem -- table-per-customer versus big-table-for-everyone.  Oracle fell over dead, even with the best indexing possible, tuned by the experts, and using partitions keyed to the customerID.

We ended up breaking it up into table-per-customer because Oracle fell over dead when we had to do a big update on a customer's entire dataset.  All other operations were slowed by the additional index on the customer-ID, especially complex joins.  With a table-for-everyone, you're forced to create tricky partitioning or clustering, clever indexes, and even with that, big updates are problematic.  And once you do this, then you become heavily tied to one RDBMS and your applications are no longer portable, because clustering, indexing, partitioning and other DB tuning tricks are very specific to each RDBMS.

When we moved to Postgres, we never revisited this issue, because both Oracle and Postgres are able to handle thousands of tables well.  As I wrote in a previous message on a different topic, often the design of your application is more important than the performance.  In our case, the table-per-customer makes the applications simpler, and security is MUCH easier.

Oracle is simply not better than Postgres in this regard.  As far as I know, there is only one specific situation (discussed frequently here) where Oracle is faster: the count(), min() and max() functions, and I know significant progress has been made since I started using Postgres.  I have not found any other query where Oracle is significantly better, and I've found several where Postgres is the clear winner.

It's telling that Oracle's license contract prohibits you from publishing comparisons and benchmarks.  You have to wonder why.

Craig



view thread (36+ messages)  latest in thread

Message-ID: <4666DF99.3010809@emolecules.com>
Permalink:  ../4666DF99.3010809@emolecules.com/
Also on:    postgresql.org/message-id/4666DF99.3010809@emolecules.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: craig_james@emolecules.com
  Subject: Re: Thousands of tables versus on table?
  In-Reply-To: <4666DF99.3010809@emolecules.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox