Re: DECODE - Mailing list pgsql-novice

From David Link
Subject Re: DECODE
Date
Msg-id 3BE6B512.FAB9DF2E@soundscan.com
Whole thread Raw
In response to Re: DECODE  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: DECODE
List pgsql-novice
Josh Berkus wrote:
>
> David,
>
> > You don't think having a separate reference table for each code
> > lookup
> > -- that is, making the datamodel more fully normalized will not
> > impact
> > performance?  Probably nominally because there will be so few rows in
> > them.
>
> It will impact performance no more than, and perhaps less than,
> evaluating a multi-stage CASE statement for each row in the query.  And
> this kind of performance concern is only an issue if you're trying to
> run a public web site on budget hardware ... otherwise, the other
> elements of your system will be more of a bottleneck than the query
> parser!  I regularly use queries and views that involve 6-9 tables,
> three UNIONS, and two sub-selects in each UNION ... and still get a 2-3
> second response time on the 500mhz Celeron production machine.

Thanks.  Good advice.
Question: How big are those tables you're joining and uniting?  (disk
size, and number of rows).

pgsql-novice by date:

Previous
From: The Cadaver
Date:
Subject:
Next
From: "Josh Berkus"
Date:
Subject: Re: problems installing