Re: Table Partitioning and Rules

From: Richard Huxton <dev(at)archonet(dot)com>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, "Girish Bajaj" <gbajaj(at)tietronix(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Table Partitioning and Rules
Date: 2003-07-18 07:06:58
Message-ID: 200307180806.58921.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thursday 17 Jul 2003 8:39 pm, Steve Crawford wrote:
> OK, so basically you are trying to keep a hundered some odd attributes on
> everyone in the US. It's possible that a 150 column table is properly
> normalized (I have a similar situation) but it is rare.
>
> Suppose it is really properly normalized. You can still benefit from
> indexes on just some of the columns by choosing those most commonly used in
> queries. You may also want to research partial indexes (create index foo
> ... where bar=baz) which can under certain circumstances be far smaller and
> faster than full indexes.

The other issue is, that even if your table is normalised you may want to
split vertically. That's going to depend on usage patterns, and I don't know
what you've got, but say you used three tables:

contact_address
contact_personal
contact_bank_details

Now a search by sales would be interested in ...address & ...personal whereas
accounts would look at ...address & ...bank_details.

This _might_ make sense, but probably only if you can group columns into
related groups and users are more interested in some groups than others. If
you are lucky the gains might be in cache usage, whereas the costs will be in
joining groups for results.

I'm not saying you should do this just to try and improve performance, but it
might make sense if users look at it that way.

> Review your structure carefully. Plan on $$$ for the hardware.

Or remind your users that patience is a virtue ;-)

--
Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Terence Kearns 2003-07-18 08:22:16 (trigger function) -> ERROR: NEW used in non-rule query
Previous Message Greg Stark 2003-07-18 06:15:28 Re: Table Partitioning and Rules