Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X6aMI-000293-SA for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jul 2014 07:07:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X6aMH-0005GJ-7q for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jul 2014 07:07:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X6aMF-0005Fz-1Z for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 07:07:31 +0000 Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X6aMA-0002DJ-V7 for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 07:07:28 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X6aM5-0004jC-SU for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 09:07:21 +0200 Received: from 217.110.94.121 ([217.110.94.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jul 2014 09:07:21 +0200 Received: from spam_eater by 217.110.94.121 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jul 2014 09:07:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Thomas Kellerer Subject: Re: Query Performance question Date: Mon, 14 Jul 2014 09:07:10 +0200 Lines: 14 Message-ID: References: <1405292142269.59034@turner.com>, <53C32B20.8010100@fuzzy.cz> <1405304448354.64039@turner.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 217.110.94.121 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <1405304448354.64039@turner.com> X-Pg-Spam-Score: 4.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 Magers, James, 14.07.2014 04:20: > Thank you for your feedback. I am attaching the requested information. > While I do not think the query is necessarily inefficient, I believe a sequence scan would be more efficient. You can try set enable_indexscan = off; set enable_bitmapscan = off; and then run your query. But I would be very surprised if a seq scan (which reads through the whole table) was faster than those 4ms you have now -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance