Re: Performance Optimization for Dummies 2 - the SQL - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Performance Optimization for Dummies 2 - the SQL
Date
Msg-id b42b73150610161407l55e66854g94b31de6dd511f16@mail.gmail.com
Whole thread Raw
In response to Re: Performance Optimization for Dummies 2 - the SQL  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
List pgsql-performance
On 10/15/06, Carlo Stonebanks <stonec.register@sympatico.ca> wrote:
> that contains full address data
> */
> select
>     f.facility_id,
>     null as facility_address_id,
>     null as address_id,
>     f.facility_type_code,
>     f.name,
>     null as address,
>     f.default_city as city,
>     f.default_state_code as state_code,
>     f.default_postal_code as postal_code,
>     f.default_country_code as country_code,
>     null as parsed_unit
> from
>     mdx_core.facility as f
> left outer join mdx_core.facility_address as fa
>     on fa.facility_id = f.facility_id
> where
>      facility_address_id is null
>      and f.default_country_code = 'US'
>      and (f.default_postal_code = '14224-1945' or f.default_postal_code =
> '14224')

what is the facility_address_id is null all about? remove it since you
hardcode it to true in select.

you have a two part part key on facility(country code, postal code), right?

merlin

pgsql-performance by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL
Next
From: "Carlo Stonebanks"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL