Re: the results from a query - question

From: Ian Barwick <barwick(at)gmx(dot)net>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>, "pgsql (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: the results from a query - question
Date: 2003-04-02 14:28:23
Message-ID: 200304021628.23868.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 02 April 2003 16:00, Johnson, Shaunn wrote:
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> Question - I'm looking at one of the users query
>
> [snip query]
> explain
> select *
> -- INTO dev_gm_er_prof01
> FROM
> db2_gm_reg_prof_01
> WHERE
> db2_gm_reg_prof_01.place_of_service = 2 and
> db2_gm_reg_prof_01.diagnosis_cd not like '29%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '30%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '310%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '311%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '312%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '313%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '314%' and
> db2_gm_reg_prof_01.diagnosis_cd not like '315%' and
> db2_pos_reg_prof_01.diagnosis_cd not like '316%'
> --ORDER BY
> -- db2_gm_reg_prof_01.contract_num ASC;
>
> [/snip query]

From this query, db2_pos_reg_prof_01 does not seem to be joined
explicity to db2_gm_reg_prof_01. This may be producing more rows than
you want (cartesian join)...

Ian Barwick
barwick(at)gmx(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-02 14:41:41 Re: the results from a query - question
Previous Message Johnson, Shaunn 2003-04-02 14:24:56 Re: the results from a query - question