Re: flattened tables with normalized tables

From: Dennis Gearon <gearond(at)fireserve(dot)net>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: flattened tables with normalized tables
Date: 2004-10-08 04:08:18
Message-ID: 416612B2.40905@fireserve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Fuhr wrote:

> On Thu, Oct 07, 2004 at 10:07:47AM -0700, Dennis Gearon wrote:
>
>>If I want to set up a dbase with normalized tables for inserts,and a
>>flattened table for selects, am i going in the right direction for
>>speeding up a busy site?
>
>
> Are you familiar with views? If so, is there a reason not to use
> them? What kinds of queries are you making? Are you experiencing
> performance problems with queries on the normalized tables? Have
> you investigated whether those queries can be sped up?
>
>
>>Also, if some of you are also doing this, how and how often do you do
>>the SELECT from the normalized tables to the flattened table?
>>And, do you have to write a post trigger to get all the references to
>>match up in the flattened table?
>
>
> General Bits had an article on materialized views a while back:
>
> http://www.varlena.com/varlena/GeneralBits/64.php
> http://www.varlena.com/varlena/GeneralBits/Tidbits/matviews.html
>
> Before deciding on a solution, be sure you fully understand the
> problem you're trying to solve.
>
I am just planning ahead. I hope to have the site I'm building mushroom into a high traffic site, and I want to be prepared. In the order that is necessary, with help fromt he list and probably the manual/books, I will throw:
tuning,
hardware selection
dedicated hardware,
materialized views
whatever else is appropriate at the right time,

at the problem.

I will also do all the things that you suggest as well, before I try materialized views. I found the same article that you quoted at a different location, so I'm up to speed on that.

About regular views, how does that speed things up, other than the initial SQL interpretation of the view not needing to be done?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Net Virtual Mailing Lists 2004-10-08 04:18:21 Re: Index problem.... GIST (tsearch2)
Previous Message Oliver Jowett 2004-10-08 03:30:30 Re: Fix setArray() when using the v3 protocol (was Re: Postgres