Re: [Q] optmizing postgres for 'single client' / many small queries

From: David Fetter <david(at)fetter(dot)org>
To: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
Cc: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [Q] optmizing postgres for 'single client' / many small queries
Date: 2009-09-03 16:28:07
Message-ID: 20090903162807.GR8410@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 03, 2009 at 07:24:50AM -0700, Richard Broersma wrote:
> On Wed, Sep 2, 2009 at 4:35 PM, David Fetter<david(at)fetter(dot)org> wrote:
>
> > Hibernate has the very nice feature of being able to get out of
> > your way.  Properly used, it can keep completely out of the
> > business of making (wrong) guesses based on DDL, which is what
> > ORMs often do. DBIx::Class
> > <http://search.cpan.org/dist/DBIx-Class/> has gone a long way in
> > the right direction.
> >
> > Ones which (attempt to) dictate decisions about DDL are just off
> > the map. :P
>
> David, do you know how well these kinds of ORMs work when it come to
> mapping non-trivial schema designs? For example, how would these
> work when creating a mapping for the multiple inheritance design
> that you've blogged about earlier?

If your mapper only does the job of mapping, you can choose
classes/objects and then map them to the appropriate, possibly
parameterized, SQL queries, which the DB people can then freely
rearrange.

One nice feature of such a system is that the DBA and/or DB developer
has a way to know what the client code expects. In OO terms, there
are public interfaces--everything mentioned in the ORM layer--and
private interfaces--DDL, DML, and DCL--to the database.

Programmers who like to use object-oriented languages and methods
should be happy about this object-oriented approach to database
management, but for some reason, a lot of them don't understand that
the idea of public and private interfaces applies to what they (too
simplistically, much of the time) think of as "the persistence layer."

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Rich 2009-09-03 16:44:12 Re: auto-increment in a view
Previous Message Raymond O'Donnell 2009-09-03 16:27:09 Re: auto-increment in a view