Re: full outer performance problem

От: Tom Lane
Тема: Re: full outer performance problem
Дата: ,
Msg-id: 10318.1115736342@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: full outer performance problem  (Kim Bisgaard)
Ответы: Re: full outer performance problem  (Kim Bisgaard)
Список: pgsql-performance

Скрыть дерево обсуждения

full outer performance problem  (Kim Bisgaard, )
 Re: full outer performance problem  (John A Meinel, )
  Re: full outer performance problem  (Kim Bisgaard, )
 Re: full outer performance problem  (Tom Lane, )
  Re: full outer performance problem  (Kim Bisgaard, )

Kim Bisgaard <> writes:
> I have two BIG tables (virtually identical) with 3 NOT NULL columns
> Station_id, TimeObs, Temp_XXXX, with indexes on (Station_id, TimeObs)
> and valid ANALYSE (set statistics=100). I want to join the two tables
> with a FULL OUTER JOIN.

I'm confused.  If the columns are NOT NULL, why isn't this a valid
transformation of your original query?

> select temp_max_60min,temp_dry_at_2m
> from station s natural join
> temp_dry_at_2m a full outer join temp_max_60min b using (station_id, timeobs)
> where s.wmo_id=6065
> and _a.timeobs='2004-1-1 0:0:0' and b._timeobs='2004-1-1 0:0:0'
> and '2004-1-1 0:0:0' between s.startdate and s.enddate;

Seems like it's not eliminating any rows that would otherwise succeed.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL
От: Mischa Sandberg
Дата:
Сообщение: Re: Partitioning / Clustering