Re: the results from a query - question
| От | Tom Lane |
|---|---|
| Тема | Re: the results from a query - question |
| Дата | |
| Msg-id | 20843.1049294501@sss.pgh.pa.us обсуждение |
| Ответ на | the results from a query - question ("Johnson, Shaunn" <SJohnson6@bcbsm.com>) |
| Список | pgsql-general |
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> 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%'
^^^
Isn't that a typo?
> Is this *really* supposed to bring back 4587594094 rows into this
> table they are trying to create?
If the two tables indeed have ~2K and ~2M rows respectively, then yes,
an unconstrained join of the two will yield ~4G rows ...
regards, tom lane
В списке pgsql-general по дате отправления: