Andrey Repko wrote:
> I have table ma_data, that contain above 300000 rows.
> This table has primary key id, and field alias_id.
> I create index (btree)on this field.
> Set statistic:
> ALTER TABLE "public"."ma_data"
> ALTER COLUMN "alias_id" SET STATISTICS 998;
> So, when I do something like
> SELECT alias_id FROM ma_data GROUP BY alias_id
Why are you using GROUP BY without any aggregate functions?
What happens if you use something like
SELECT DISTINCT alias_id FROM ma_data;
In response to
pgsql-performance by date
|Next:||From: Sean Davis||Date: 2005-09-27 10:54:51|
|Subject: Re: Index use in BETWEEN statement...|
|Previous:||From: Abhijit Menon-Sen||Date: 2005-09-27 10:27:01|
|Subject: Re: PostgreSQL overall design|