X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 032179DCD7F for ; Mon, 13 Mar 2006 15:16:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23828-05 for ; Mon, 13 Mar 2006 15:16:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by postgresql.org (Postfix) with ESMTP id 01D0C9DCD8D for ; Mon, 13 Mar 2006 15:16:52 -0400 (AST) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO [192.168.1.27]) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 9102598; Mon, 13 Mar 2006 11:19:50 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: firebird X postgresql 8.1.2 windows, performance comparison Date: Mon, 13 Mar 2006 11:15:00 -0800 User-Agent: KMail/1.8 Cc: "andremachado" References: <20060313175614.M17691@techforce.com.br> In-Reply-To: <20060313175614.M17691@techforce.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603131115.01056.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.083 required=5 tests=[AWL=0.083] X-Spam-Score: 0.083 X-Spam-Level: X-Archive-Number: 200603/168 X-Sequence-Number: 17605 Andre, > http://candle.pha.pa.us/main/writings/pgsql/hw_performance/ > brought some light over the subject. For few users, could be a viable > alternative. That article is very old. Read this instead: http://www.powerpostgresql.com/PerfList > select count(distinct NF.ID_NF ) as contagem, DE.AM_REFERENCIA as campo > from DECLARACAO DE inner join CADASTRO CAD on > (CAD.ID_DECLARACAO=DE.ID_DECLARACAO) > inner join NOTA_FISCAL NF on (NF.ID_CADASTRO=CAD.ID_CADASTRO) > inner join EMPRESA EMP on (EMP.ID_EMPRESA=DE.ID_EMPRESA) > inner join ARQUIVO_PROCESSADO ARQ on (ARQ.ID_ARQUIVO=DE.ID_ARQUIVO) > group by DE.AM_REFERENCIA > order by DE.AM_REFERENCIA > > firebird windows executed in 1min30s > postgresql windows is running for 3 hours and still not finished. How about an EXPLAIN? And, did you run ANALYZE on the data? > I already know that count() is VERY performance problematic in > postgresql. Is there a way to work around this? > Unfortunately, the deadline for my friend project is approaching and he > is giving up postgresql for firebird. > If some work around is available, he will give another try. But i > already saw that count and joins are still problem. > He asked me if other people are struggling with poor performance and > wondered if all other users are issuing simple queries only. No, actually we excel at complex queries. Some of the data warehousing stuff I run involves queries more than a page long. Either you're hitting some Windows-specific problem, or you still have some major basic tuning issues. That being said, there's nothing wrong with Firebird if he wants to use it. -- --Josh Josh Berkus Aglio Database Solutions San Francisco