Re: is this expected or am i on crack?

Поиск
Список
Период
Сортировка
От Chris Jones
Тема Re: is this expected or am i on crack?
Дата
Msg-id a5fitm1mlob.fsf@legolas.mt.sri.com
обсуждение исходный текст
Ответ на is this expected or am i on crack?  (Chris Humphries <chumphries@siliconinc.net>)
Список pgsql-general
Chris Humphries <chumphries@siliconinc.net> writes:

> the sql:
> select keyword from facts as f1
> where 1 <> (select count(*) from facts as f2 where f1.keyword = f2.keyword)
> order by keyword;

Aside from the suggestion of not using a subquery, you could try
making an index on keyword, and doing a VACUUM of the table, before
you try your query -- whatever the query ends up being.  Indexes don't
have to be unique, after all.

Chris

--
chris@mt.sri.com -----------------------------------------------------
Chris Jones                                    SRI International, Inc.
                                                           www.sri.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using NULL values in calculated results
Следующее
От: Tom Lane
Дата:
Сообщение: Re: www-sql question