Re: which is more scalable for the database?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Timasmith <timasmith(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: which is more scalable for the database?
Date: 2007-03-08 16:02:49
Message-ID: 45F033A9.0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Timasmith wrote:
> Suppose I have a database table with 20 fields which are lookups to a
> single table.
>
> configtable(configtable_id, a_field, something_lookup_id,
> another_lookup_id, ...)
> lookup(lookup_id, value, description, ...)
>
>
> what is going to be faster to map the rows to an Object which needs
> the 'value' for every field ending in lookup_id
[snip]
> b) Cache all lookup values and populate

> It seems that the latter *might* be better to scale outward better,
> as
> you could add application servers to do the caching/mapping and you
> only select from a single table?

It *might* scale better and be faster. It might not. The only way to
know is to test it. When you do compare, don't forget to allow for
handling changes to the lookup table in the database.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-03-08 16:04:11 Re: foreign key support for inheritance
Previous Message Tomi N/A 2007-03-08 16:02:10 Re: DB Modeler