Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Ao1-0005dW-NK for pgsql-performance@arkaria.postgresql.org; Thu, 26 Jun 2014 14:37:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X0Ao1-0003mV-5P for pgsql-performance@arkaria.postgresql.org; Thu, 26 Jun 2014 14:37:41 +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 1X0Anz-0003k2-43 for pgsql-performance@postgresql.org; Thu, 26 Jun 2014 14:37:39 +0000 Received: from smtp.optionshouse.com ([38.98.137.6] helo=smtp.peak6.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X0Ant-000380-I1 for pgsql-performance@postgresql.org; Thu, 26 Jun 2014 14:37:38 +0000 X-AuditID: 0a64cb20-f79426d000005a0a-bb-53ac302ac5ab Message-ID: <53AC3024.5040409@optionshouse.com> Date: Thu, 26 Jun 2014 09:37:24 -0500 From: Shaun Thomas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: AJ Weber , "pgsql-performance@postgresql.org" Subject: Re: how to improve perf of 131MM row table? References: <53AB2CB1.8080201@comcast.net> <53AB35CC.10202@optionshouse.com> <1801a5d4-c3f1-4c0c-9c2c-ffb9d7f723a3@email.android.com> <53AB4551.4070207@optionshouse.com> <53AC1F6E.4000700@comcast.net> <53AC28AF.1060500@optionshouse.com> <53AC2CC3.9060403@comcast.net> In-Reply-To: <53AC2CC3.9060403@comcast.net> Content-Type: text/plain; charset="windows-1252"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.220.56] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsXClcIrpqtlsCbYoG2dkMXd9ffYLa7PPMfs wOQx+fEcRo8L+6axBzBFNTDaJObl5ZcklqQqpKQWJ9sq+ReUZObnFXvklxanKrhkFifnJGbm phYpKWSm2CoZKykU5CQmp+am5pXYKiUWFKTmpSjZcSlgABugssw8hdS85PyUzLx0WyXPYH9d CwtTS11DJbt4ZJDQyZJxb80y1oKtHBVtC+8yNTCeY+ti5OCQEDCR+DFbvouRE8gUk7hwbz0b iM0roC/x7dlCRhCbRUBVYueUqWBxNgFdiUn9K8BsUYEwicdzzjFC1AtKnJz5hAXEFhHIktg4 ZT87iC0sYCcx5+ZBoDgXh5BAN5PExANHmUASnALaEns+rwe7gVnAXuLB1jKQMLOAvMT2t3OY QWwhoL0rmidCnakAdFvqBEb+WUi2zUJonoWkeQEj8ypG8eKyxOSMTNOC4tySAiO9gtTEbDO9 vNSSTYzgWDutsIPxe6fVIUYBDkYlHl4BhtXBQqyJZcWVuYcYJTiYlUR4j0mtCRbiTUmsrEot yo8vKs1JLT7E6AMMjYnMUqLJ+cA0kFcSb2hsamBqaWpoam5qaIRDWEmc90hLXLCQQDow+rNT UwtSi2DGMXFwSjUwnix+5zOlxStt17H9XFzrZjOavJneuFLMnTm6iuvkyeR3L85IqctXMCoY XTzzQ31207y0u7Nv1/mqc6pd3ZIw733Ds8fcPHvtdGwfBvG3BumrGL9Senr4wYfzYtZLrqXd 7H7ruTH4+er387dG/njoGBC5UTHtHSt/9LFWvauhe4/JLFf7Hno7XYmlOCPRUIu5qDgRACI7 BTfiAgAA X-Pg-Spam-Score: -1.9 (-) 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 On 06/26/2014 09:22 AM, AJ Weber wrote: > I sent the details as identified by pgAdmin III. Interesting. Either there is a bug in pgAdmin, or you're connecting to a different database that is missing the primary key. What is the EXPLAIN ANALYZE output if you execute the query you sent on a psql prompt? > "alf_node_pkey" PRIMARY KEY, btree (id) CLUSTER > would indicate to me that there is a PK on alf_node table, it is on > column "id", it is of type btree, and the table is clustered around that > index. > > Am I reading this totally wrong? No, that's right. But that wasn't in the SQL you sent. In fact, there's a lot of stuff missing in that output. Try running the EXPLAIN ANALYZE using the same psql connection you used to retrieve the actual table structure just now. I suspect you've accidentally connected to the wrong database. If it's still doing the sequence scan, we'll have to dig deeper. -- Shaun Thomas OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance