pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: pgsql-hackers@postgreSQL.org
Cc: pgsql-sql@postgreSQL.org
Subject: counting distinct result of join
Date: Tue, 4 Apr 2000 22:35:35 +0300 (GMT)
Message-ID: <Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra> (raw)

Hi,

are there an efficient way to count distinct result from join ?
I know it's possible in 7.0 to do 

select count(distinct m.msg_id) from messages m, message_section_map ms
where m.msg_id = ms.msg_id;

but I need it working in production for 6.5.3
I'd like not to use temp tables as I dont' have any experience
with them in production.

	Regards,

		Oleg

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83





Message-ID: <Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra>
Permalink:  ../Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra/
Also on:    postgresql.org/message-id/Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: oleg@sai.msu.su, pgsql-hackers@postgreSQL.org
  Subject: Re: counting distinct result of join
  In-Reply-To: <Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra>
  References: <Pine.GSO.3.96.SK.1000404222531.13408S-100000@ra>

* 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