Re: SELECT DISTINCT too slow

From: Miroslav Šulc <miroslav(dot)sulc(at)startnet(dot)cz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: SELECT DISTINCT too slow
Date: 2006-06-01 15:03:22
Message-ID: 447F01BA.5040108@startnet.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

It might be a good solution :-)

Thank you for your help.

Miroslav Šulc

Alvaro Herrera napsal(a):
> Miroslav ?ulc wrote:
>
>> Well, "key" is not primary key from another table. It is just a column
>> in pair "key" => "value".
>> The structure of the table is this:
>>
>> Id (primary key)
>> MRTPContactId (id of contact from table MRTPContact)
>> Key (key from pair key => value)
>> Value (value from pair key => value)
>>
>> So I want the get the list of keys used in the table.
>>
>
> The plan you get is the most efficient possible for that query. If you
> had a table of possible keys (which should of course be FK of "Key"),
> you could get a much faster version :-)
>
>

Attachment Content-Type Size
miroslav.sulc.vcf text/x-vcard 349 bytes

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-06-01 15:20:30 Re: SELECT DISTINCT too slow
Previous Message Alvaro Herrera 2006-06-01 14:53:28 Re: SELECT DISTINCT too slow