Re: SELECT DISTINCT Performance Issue

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "K C Lau" <KCLau(at)attglobal(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: SELECT DISTINCT Performance Issue
Date: 2005-06-06 11:45:39
Message-ID: op.srx5mdsmth1vuj@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Previously, we have also tried to use LIMIT 1 instead of DISTINCT, but
> the performance was no better:
> select PlayerID,AtDate from Player where PlayerID='22220' order by
> PlayerID desc, AtDate desc LIMIT 1

The DISTINCT query will pull out all the rows and keep only one, so the
one with LIMIT should be faster. Can you post explain analyze of the LIMIT
query ?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2005-06-06 11:54:03 Re: Need help to decide Mysql vs Postgres
Previous Message Andrew McMillan 2005-06-06 06:48:45 Re: Postgresql and Software RAID/LVM