Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by hub.org (8.9.3/8.9.3) with ESMTP id PAA27147; Tue, 4 Apr 2000 15:35:41 -0400 (EDT) (envelope-from oleg@sai.msu.su) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.9.3/8.9.3) with SMTP id WAA09486; Tue, 4 Apr 2000 22:35:35 +0300 (GMT) Date: Tue, 4 Apr 2000 22:35:35 +0300 (GMT) From: Oleg Bartunov X-Sender: megera@ra Reply-To: Oleg Bartunov To: pgsql-hackers@postgreSQL.org cc: pgsql-sql@postgreSQL.org Subject: counting distinct result of join Message-ID: Organization: Sternberg Astronomical Institute (Moscow University) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200004/33 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