Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 580969FA2FC for ; Mon, 11 Dec 2006 00:02:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 52270-03 for ; Mon, 11 Dec 2006 00:02:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 3549E9FA248 for ; Mon, 11 Dec 2006 00:02:43 -0400 (AST) Received: from [192.168.1.95] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id kBB42jlY010927 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sun, 10 Dec 2006 20:02:46 -0800 Subject: Re: SQL_CALC_FOUND_ROWS in POSTGRESQL / Some one can From: "Joshua D. Drake" To: Chris Cc: marcosborges@mbsi.com.br, pgsql-performance@postgresql.org In-Reply-To: <457CD182.7020004@gmail.com> References: <457814D3.1030001@mbsi.com.br> <457CD182.7020004@gmail.com> Content-Type: text/plain Organization: Command Prompt, Inc. Date: Sun, 10 Dec 2006 20:04:38 -0800 Message-Id: <1165809878.19970.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Sun, 10 Dec 2006 20:02:47 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/202 X-Sequence-Number: 22258 On Mon, 2006-12-11 at 14:33 +1100, Chris wrote: > Marcos Borges wrote: > > 07/12/2006 04:31 > > *SQL_CALC_FOUND_ROWS in POSTGRESQL* > > > > In mysqln i m using the command SQL_CALC_FOUND_ROWS in follow sintax. > > SELECT SQL_CALC_FOUND_ROWS name, email, tel FROM mytable WHERE name <> > > '' LIMIT 0, 10 > > to have the recorset data. > > and > > SELECT FOUND_ROWS(); > > to have the total of registers found. > > > > I dont want to use the command count(*), because the performance will > > fall down, depending of the quantyt of tables and "joins". > > > > The Data base postgresql have something similar ??? > > Nope, you're out of luck sorry. That's a mysql-ism and I doubt postgres > will ever include something similar. Your language will have a similar binding. Something like pg_numrows. Sincerely, Joshua D. Drake > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate