pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Miroslav Šulc <miroslav.sulc@startnet.cz>
To: pgsql-sql@postgresql.org
Subject: Re: SELECT DISTINCT too slow
Date: Thu, 01 Jun 2006 17:03:22 +0200
Message-ID: <447F01BA.5040108@startnet.cz> (raw)
In-Reply-To: <20060601145327.GA19388@surnet.cl>
References: <447EEAF1.7040305@startnet.cz>
	<20060601135310.GB18513@surnet.cl>
	<447EFE92.2070509@startnet.cz>
	<20060601145327.GA19388@surnet.cl>

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 :-)
>
>   

Attachments:

miroslav.sulc.vcf (text/x-vcard, 347B) download begin:vcard fn;quoted-printable:Miroslav =C5=A0ulc n;quoted-printable:=C5=A0ulc;Miroslav org:StartNet s.r.o. adr;quoted-printable;quoted-printable:;;Schodov=C3=A1 309/10;Praha 5;;150 00;=C4=8Cesk=C3=A1 republika email;internet:miroslav.sulc@startnet.cz tel;cell:+420 603 711 413 x-mozilla-html:TRUE url:http://www.startnet.cz version:2.1 end:vcard

view thread (13+ messages)  latest in thread

Message-ID: <447F01BA.5040108@startnet.cz>
Permalink:  ../447F01BA.5040108@startnet.cz/
Also on:    postgresql.org/message-id/447F01BA.5040108@startnet.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: miroslav.sulc@startnet.cz
  Subject: Re: SELECT DISTINCT too slow
  In-Reply-To: <447F01BA.5040108@startnet.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox