Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZN2RJ-0005Me-PL for pgsql-performance@arkaria.postgresql.org; Wed, 05 Aug 2015 17:25:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZN2RJ-0004d1-AP for pgsql-performance@arkaria.postgresql.org; Wed, 05 Aug 2015 17:25:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZN2RH-0004bS-SI for pgsql-performance@postgresql.org; Wed, 05 Aug 2015 17:25:16 +0000 Received: from nm17-vm7.bullet.mail.gq1.yahoo.com ([98.137.177.231]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZN2RD-0001bl-Br for pgsql-performance@postgresql.org; Wed, 05 Aug 2015 17:25:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1438795506; bh=7vlME58G+Flq/pqDEwaqFeTORSEch+at1TN3JgjoPgw=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=T8fKgZrWs3CosnS4PlhMjhRQQbmaqHgofCiEXOT2ri0E+TYYL4WzrA2bC72CeFDO9K/z4yqWh9raf+CTqCTcb6dhO61zRF18ofjrb2VvwB7zw85KgaeMofgz3z57/DhPpN3XasZF08uipf7zWNKS4Z5grmXIoFXhlIAAWPTMqYecM/vpl+TrL/pF3v0CGjaMbD7LcK1ngF3tJVFbuR2IkAYeAQLAi/BfI7WMfqikUEyMSFn+Vff95jRaRyPF5225WT5GN4R2lYsN/MXvDXDwTCX0qi84F6J//lRenxRuyIvJet1+ni9DOsQYiBpk7VUIYdRNopkE+3eQTtXGeoNWKA== Received: from [98.137.12.189] by nm17.bullet.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 17:25:06 -0000 Received: from [98.137.12.210] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 17:25:06 -0000 Received: from [127.0.0.1] by omp1018.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 17:25:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 580031.39006.bm@omp1018.mail.gq1.yahoo.com X-YMail-OSG: _AFo3oAVM1knBaRTyZ1mq0WPE5h5kbyfmkF7YhnhwsRMcyDk72HYvt1O36K5ExY hxao4IoHVmOXFgOOa_2Hqpc5szO34AwJo15GreFBnmXU0BAW_pnoNeEUSyfzzajaaEBdbwo0GdKI rUFLaZtEkTXW9PcEKE63FH.TuwDTALnbAfWdNUL_XWNC8q1F0LJnLi5BoBh.rIMelxFZ4JvH3SzH _jGLI9S4.Yn6.CnQG7rZrRO7Zy.U0_KQnSOSszNmWvKM8BNDsdps.lX6Wy7WVVbEdy3Lko8IpMsR srySQn16srw1NDBwaSK51Yl1nGUV3W8qamTj9gRUGJEJVqzNvZBh4eD4OLKI5lYXb425_Kbm4mPM N090M8JMGZv6kQAwfcTqPxlfrj.tjBJgEJQp1eoyleP59ADGhz_zSukQCwMxzdnDCQW.veaMT5ae Uf4y7q6CqNO5rS6w11HqZ.7.9hjBaEsh8DxF2YJQwic7USVebAU9pJg11lZFikXgoBuFLeaE- Received: by 216.39.60.202; Wed, 05 Aug 2015 17:25:06 +0000 Date: Wed, 5 Aug 2015 17:24:48 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: Alexandre de Arruda Paes , "pgsql-performance@postgresql.org" Message-ID: <294645189.286929.1438795488655.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: Slow HashAggregate/cache access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1164 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Alexandre de Arruda Paes wrote: > We did the following tests: > > 1) Postgresql 9.3 and Oracle 10 in a desktop machine(8 GB RAM, 1 SATA disk,Core i5) > 2) Postgresql 9.3 in a server + FC storage (128 GB RAM, Xeon 32 cores, SAS disks) That's only part of the information we would need to be able to give specific advice. Please read this page: https://wiki.postgresql.org/wiki/SlowQueryQuestions One possibility is that you are running with the default configuration, rather than having tuned for the hardware. You are very likely to need to adjust shared_buffers, effective_cache_size, work_mem, maintenance_work_mem, random_page_cost, cpu_tuple_cost, and (at least for the second machine) effective_io_concurrency. If the queries have a lot of joins you may need to increase from_collapse_limit and/or join_collapse_limit. You also may need to adjust [auto]vacuum and/or background writer settings. Various OS settings may matter, too. To get a handle on all this, it might be worth looking for Greg Smith's book on PostgreSQL high performance. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance