Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X6gc7-0006kI-T1 for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jul 2014 13:48:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X6gc7-0006i3-7x for pgsql-performance@arkaria.postgresql.org; Mon, 14 Jul 2014 13:48:19 +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 1X6gc6-0006hx-Da for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 13:48:18 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X6gc2-0003bR-6w for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 13:48:17 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X6gc1-00045L-1T for pgsql-performance@postgresql.org; Mon, 14 Jul 2014 15:48:13 +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 15:48:13 +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 15:48:13 +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 15:48:03 +0200 Lines: 15 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: X-Pg-Spam-Score: 1.3 (+) 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 15:18: > Thank you. I executed the query this morning after disabling the scan types. > I am including links to explain.depesz output for each of the three variations that I executed. > > indexscan and bitmapscan off: http://explain.depesz.com/s/sIx > seqscan and bitmapscan off: http://explain.depesz.com/s/GfM > bitmapscan off: http://explain.depesz.com/s/3wna > So the original query (using an "Index Scan" + "Bitmap Index Scan") is indeed the most efficient one: 4ms vs. 39ms vs. 64ms -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance