Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThM83-0005Ss-7H for pgsql-performance@arkaria.postgresql.org; Sat, 08 Dec 2012 15:15:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ThM82-0006ly-KN for pgsql-performance@arkaria.postgresql.org; Sat, 08 Dec 2012 15:15:46 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThM81-0006kt-7N for pgsql-performance@postgresql.org; Sat, 08 Dec 2012 15:15:45 +0000 Received: from sd-17937.dedibox.fr ([88.191.100.74]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThM7z-0007dH-GB for pgsql-performance@postgresql.org; Sat, 08 Dec 2012 15:15:44 +0000 Received: from [192.168.1.49] (100.173.82.79.rev.sfr.net [79.82.173.100]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 60BE93B914; Sat, 8 Dec 2012 16:26:38 +0100 (CET) Message-ID: <1354979742.1963.11.camel@localhost.localdomain> Subject: Re: Slow query: bitmap scan troubles From: Guillaume Lelarge To: Jeff Janes Cc: postgresql@foo.me.uk, postgres performance list Date: Sat, 08 Dec 2012 16:15:42 +0100 In-Reply-To: References: <092a01cdd230$ff6143c0$fe23cb40$@foo.me.uk> <097601cdd249$ae338530$0a9a8f90$@foo.me.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Tue, 2012-12-04 at 15:42 -0800, Jeff Janes wrote: > On Tue, Dec 4, 2012 at 10:03 AM, wrote: > >[...] > > > > Is there some nice bit of literature somewhere that explains what sort of > > costs are associated with the different types of lookup? > > I've heard good things about Greg Smith's book, but I don't know if it > covers this particular thing. > > Otherwise, I don't know of a good single place which is a tutorial > rather than a reference (or the code itself) > Greg's book is awesome. It really gives a lot of informations/tips/whatever on performances. I mostly remember all the informations about hardware, OS, PostgreSQL configuration, and such. Not much on the EXPLAIN part. On the EXPLAIN part, you may have better luck with some slides available here and there. Robert Haas gave a talk on the query planner at pgCon 2010. The audio feed of Robert Haas talk is available with this file: http://www.pgcon.org/2010/audio/15%20The%20PostgreSQL%20Query% 20Planner.mp3 You can also find the slides on https://sites.google.com/site/robertmhaas/presentations You can also read the "Explaining the Postgres Query Optimizer" talk written by Bruce Momjian. It's available there : http://momjian.us/main/presentations/internals.html And finally, you can grab my slides over here: http://www.dalibo.org/_media/understanding_explain.pdf. You have more than slides. I tried to put a lot of informations in there. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance