Optimizer Question - Mailing list pgsql-general

From Dimitri
Subject Optimizer Question
Date
Msg-id 98081111195906.00369@dimitri
Whole thread Raw
List pgsql-general
Hi All!

I've tried some developements with PG and was surprised
by optimizer... So:

1. Why in query: "select distinct Attr from Table;"
optimizer never use Attr's index and always pass by Seq Scan?

2. Why in general any queries like:
    select Attr from Table where --any conditions with Attr--;
optimizer choose Seq Scan and not Attr's index, when using of
Attr's index significally increases performance...

Thanks for any help.
(dim)

--
=====================================================
 Dimitri KRAVTCHUK  (dim)           Sun Microsystems
 Benchmark Engineer                 France
 dimitri@France.Sun.COM
=====================================================

pgsql-general by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [GENERAL] removal of types
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] removal of types