Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WztWi-0006Ql-7J for pgsql-performance@arkaria.postgresql.org; Wed, 25 Jun 2014 20:10:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WztWh-0002Cn-Jh for pgsql-performance@arkaria.postgresql.org; Wed, 25 Jun 2014 20:10:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WztWg-0002Cg-9O for pgsql-performance@postgresql.org; Wed, 25 Jun 2014 20:10:38 +0000 Received: from qmta01.westchester.pa.mail.comcast.net ([2001:558:fe14:43:76:96:62:16]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WztWb-0007e7-Lz for pgsql-performance@postgresql.org; Wed, 25 Jun 2014 20:10:36 +0000 Received: from omta14.westchester.pa.mail.comcast.net ([76.96.62.60]) by qmta01.westchester.pa.mail.comcast.net with comcast id Jj591o0051HzFnQ51kAWQ7; Wed, 25 Jun 2014 20:10:30 +0000 Received: from [192.168.1.172] ([98.109.148.138]) by omta14.westchester.pa.mail.comcast.net with comcast id JkAM1o00L2zPoey3akAPL0; Wed, 25 Jun 2014 20:10:28 +0000 Message-ID: <53AB2CB1.8080201@comcast.net> Date: Wed, 25 Jun 2014 16:10:25 -0400 From: AJ Weber User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Subject: how to improve perf of 131MM row table? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1403727030; bh=GhQnlUU16eU5w1Czc/C6RT2L3cnRACD2o0c20xGjr8M=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=KvMWl29QBdYqVmwxzkLSFLIgyrO7NaX8WFsGll03y4myTzwAUKeUYJ/pzihxlOx4a kGAbkBQP8a5wtnrc3Jc7lx7Xg+mRX51lvKJLtbD2Hv7zWYSt5kocGUsdmIPTHd6rNp dV5A7Z5CPTNUFlHdAgkp6md4VF6WtkAJeqMlXMCleoC/ubHj7qroYN29uYqrmeTX7k HadXWnEYsTpXKvUMni3BHQAgTETwbVHcv0uS+OMcP+KfsDG2mAXCG9iInL3LiXe2kH jlPHsSW8APPfh3jqeYH/ljs5nltFXyparK2bHq556/zDnje2+LEw36T5TePDuGvPfe TtcIpwoPCSubA== X-Pg-Spam-Score: -2.0 (--) 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 Sorry for the semi-newbie question... I have a relatively sizable postgresql 9.0.2 DB with a few large tables (keep in mind "large" is relative, I'm sure there are plenty larger out there). One of my queries that seems to be bogging-down performance is a join between two tables on each of their BIGINT PK's (so they have default unique constraint/PK indexes on them). One table is a detail table for the other. The "master" has about 6mm rows. The detail table has about 131mm rows (table size = 17GB, index size = 16GB). I unfortunately have limited disks, so I can't actually move to multiple spindles, but wonder if there is anything I can do (should I partition the data, etc.) to improve performance? Maybe some further tuning to my .conf, but I do think that's using as much mem as I can spare right now (happy to send it along if it would help). DB is vacuumed nightly with stats updates enabled. I can send the statistics info listed in pgAdmin tab if that would help. Any suggestions, tips, tricks, links, etc. are welcomed! Thanks in advance, AJ -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance