Re: [GENERAL] SELECT DISTINCT performance issue

2005-06-05 Thread K C Lau
At 13:06 05/06/05, Tom Lane wrote: K C Lau <[EMAIL PROTECTED]> writes: > esdt=> explain analyze select DISTINCT ON (PlayerID) PlayerID,AtDate from > Player > where PlayerID='0' order by PlayerID desc, AtDate desc; > Unique (cost=0.00..2507.66 rows=1 width=23) (actual time=0.000..187.000

Re: [GENERAL] SELECT DISTINCT performance issue

2005-06-04 Thread Tom Lane
K C Lau <[EMAIL PROTECTED]> writes: > esdt=> explain analyze select DISTINCT ON (PlayerID) PlayerID,AtDate from > Player > where PlayerID='0' order by PlayerID desc, AtDate desc; > Unique (cost=0.00..2507.66 rows=1 width=23) (actual time=0.000..187.000 > rows=1 loops=1) > -> Index S

[GENERAL] SELECT DISTINCT performance issue

2005-06-04 Thread K C Lau
Hi All, We are testing PostgreSQL 8.0.3 on MS Windows for porting an OLTP system from MS SqlServer. We got a major performance issue which seems to boil down to the following type of query: select DISTINCT ON (PlayerID) PlayerID,AtDate from Player where PlayerID='0' order by PlayerID