Re: SQL question - problem with INTERSECT

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: SQL question - problem with INTERSECT
Дата
Msg-id 20001102144449.A7284@gruby
обсуждение исходный текст
Ответ на SQL question - problem with INTERSECT  ("Keith L. Musser" <kmusser@idisys.com>)
Список pgsql-general
On Thu, Nov 02, 2000 at 06:50:07AM -0500, Keith L. Musser wrote:
> > upper(a.word) = 'JIM' or upper(a.word) = 'JONES'
> > upper(s.word) = 'HELLO' or upper(s.word) = 'THERE'
> Interesting possibility.  Unfortunately, the outer select ends up being
> a sequential scan over the entire messages table, where at each row the
> message id is looked up sequentially in the nested query.

did you try my quesry with "upper's" in it?
if so then is your index on a.word or on upper(a.word)?
try making functional indies, and of course vacuum'im tables to make indices
work.
this query *should* work with indices.

depesz

--
hubert depesz lubaczewski
------------------------------------------------------------------------
     najwspanialszą rzeczą jaką dało nam nowoczesne społeczeństwo,
      jest niesamowita wręcz łatwość unikania kontaktów z nim ...

В списке pgsql-general по дате отправления:

Предыдущее
От: Andy Corteen
Дата:
Сообщение: Re[2]: autostart postgresql
Следующее
От: Justin Foster
Дата:
Сообщение: Memory Leak