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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to