Re: is this expected or am i on crack? - Mailing list pgsql-general

From Chris Jones
Subject Re: is this expected or am i on crack?
Date
Msg-id a5fitm1mlob.fsf@legolas.mt.sri.com
Whole thread Raw
In response to is this expected or am i on crack?  (Chris Humphries <chumphries@siliconinc.net>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using NULL values in calculated results
Next
From: Tom Lane
Date:
Subject: Re: www-sql question