Re: way to speed up a SELECT DISTINCT? - Mailing list pgsql-performance

From Shridhar Daithankar
Subject Re: way to speed up a SELECT DISTINCT?
Date
Msg-id 3F86914E.2070100@persistent.co.in
Whole thread Raw
In response to Re: way to speed up a SELECT DISTINCT?  (Seth Ladd <seth@picklematrix.net>)
List pgsql-performance
Seth Ladd wrote:

>> peter@bernardo:express=# explain select distinct region from region;
>>                                           QUERY PLAN
>> -----------------------------------------------------------------------
>> -----------------------
>>  Unique  (cost=0.00..4326.95 rows=9518 width=14)
>>    ->  Index Scan using regionview_region on region   (cost=0.00..4089.00
>> rows=95183 width=14)
>> (2 rows)
>
>
> Thanks for the tip, I'll give this a shot soon.  I am curious, your
> example above does not use GROUP BY yet you have an INDEX SCAN.  I am
> using a similar query, yet I get a full table scan.  I wonder how they
> are different?

Have you tuned your shared buffers and effective cache correctly?

  Shridhar


pgsql-performance by date:

Previous
From: Seth Ladd
Date:
Subject: Re: way to speed up a SELECT DISTINCT?
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: way to speed up a SELECT DISTINCT?