Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 29AEB650154 for ; Thu, 21 Aug 2008 11:16:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97290-04-5 for ; Thu, 21 Aug 2008 11:16:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp130.rog.mail.re2.yahoo.com (smtp130.rog.mail.re2.yahoo.com [206.190.53.35]) by postgresql.org (Postfix) with SMTP id 0BC56650176 for ; Thu, 21 Aug 2008 11:16:42 -0300 (ADT) Received: (qmail 80490 invoked from network); 21 Aug 2008 14:16:41 -0000 Received: from unknown (HELO ?99.246.51.72?) (markmielke@rogers.com@99.246.51.72 with plain) by smtp130.rog.mail.re2.yahoo.com with SMTP; 21 Aug 2008 14:16:41 -0000 X-YMail-OSG: RLmFboYVM1mVbOpzFWFkfHzV9wLEsIg1d9bQ..WFY9hHgTy0tD9wvRbejV11bL63uw-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <48AD78C8.80500@mark.mielke.cc> Date: Thu, 21 Aug 2008 10:16:40 -0400 From: Mark Mielke User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Andr=E9_Volpato?= CC: pgsql-performance@postgresql.org Subject: Re: Postgres not using array References: <48AC8292.5000708@ecomtecnologia.com.br> <48AD735D.6040403@ecomtecnologia.com.br> In-Reply-To: <48AD735D.6040403@ecomtecnologia.com.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/248 X-Sequence-Number: 31129 André Volpato wrote: > In practice, I have noticed that dual 1.8 is worse than single 3.0. We > have another server wich > is a Pentium D 3.0 GHz, that runs faster. > ... > Postgres read the array in less than 1 sec, and the other 10s he takes > 100% of CPU usage, > wich is, in this case, one of the two cores at 1.8GHz. > > I am a bit confused about what CPU is best for Postgres. Our apps is > mostly read, with > a few connections and heavy queryes. > Does it worth a multi-core ? How are you doing your benchmarking? If you have two or more queries running at the same time, I would expect the 1.8 Ghz x 2 to be significant and possibly out-perform the 3.0 Ghz x 1. If you usually only have one query running at the same time, I expect the 3.0 Ghz x 1 to always win. PostgreSQL isn't good at splitting the load from a single client across multiple CPU cores. Cheers, mark -- Mark Mielke