Re: BUG: PG do not use index

From: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
To: Eugen(dot)Konkov(at)aldec(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG: PG do not use index
Date: 2008-03-26 09:08:02
Message-ID: 47EA1272.4070904@batory.org.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2008-03-26 09:41, Eugen(dot)Konkov(at)aldec(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Eugen.Konkov 2008-03-26 09:45:19 Re: BUG: PG do not use index
Previous Message Julius Tuskenis 2008-03-26 09:00:09 BUG #4061: after backup/restore pg_attrdef.adsrc column lacks schema name.