Re: BUG: PG do not use index - Mailing list pgsql-bugs

From Tomasz Ostrowski
Subject Re: BUG: PG do not use index
Date
Msg-id 47EA1272.4070904@batory.org.pl
Whole thread Raw
In response to Re: BUG: PG do not use index  (<Eugen.Konkov@aldec.com>)
List pgsql-bugs
On 2008-03-26 09:41, Eugen.Konkov@aldec.com wrote:

> 5. explain select count(*) from akh_testing_result
> Aggregate  (cost=206372.95..206372.95 rows=1 width=0)
>   ->  Seq Scan on akh_testing_result  (cost=0.00..184804.56 rows=8627356
> width=0)

You will always get seq scan when you select count(*) without where:
http://sql-info.de/en/postgresql/postgres-gotchas.html#1_7

> select max(id) from akh_testing_result
> 8817173
> I will try to update from 8.0 to 8.3

This will help with select max(id). An update is recommended anyway. And
it is required if you are using Windows, as 8.0 is not supported on
Windows anymore.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-bugs by date:

Previous
From: "Julius Tuskenis"
Date:
Subject: BUG #4061: after backup/restore pg_attrdef.adsrc column lacks schema name.
Next
From:
Date:
Subject: Re: BUG: PG do not use index