pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: postgres 7.4 vs 8.x redux: query plans
Date: Tue, 03 Apr 2007 17:21:05 -0400
Message-ID: <12660.1175635265@sss.pgh.pa.us> (raw)
In-Reply-To: <a728f9f90704031334x25bc8a60o991a476b774cc9fa@mail.gmail.com>
References: <a728f9f90704022209x1cd688f6pa9c8c2584376897e@mail.gmail.com>
	<17931.1175578083@sss.pgh.pa.us>
	<a728f9f90704030937t4855d730u41bd890de3d84603@mail.gmail.com>
	<a728f9f90704031230y11451335i1a56fd8a7eba3a8e@mail.gmail.com>
	<b42b73150704031313r3395d5fbi963857b8457b6fa6@mail.gmail.com>
	<a728f9f90704031318l6471f6a3p3fc166b50031c213@mail.gmail.com>
	<a728f9f90704031334x25bc8a60o991a476b774cc9fa@mail.gmail.com>

"Alex Deucher" <alexdeucher@gmail.com> writes:
> Turning off bitmapscan ends up doing a sequential scan.  Turning off
> both bitmapscan and seqscan results in a bitmap heap scan.  It doesn't
> seem to want to use the index at all.  Any ideas?

The "ORed indexscans" plan style that was in 7.4 isn't there anymore;
we use bitmap OR'ing instead.  There actually are repeated indexscans
hidden under the "= ANY" indexscan condition in 8.2, it's just that
the mechanism for detecting duplicate matches is different.  AFAIK the
index access costs ought to be about the same either way, and the other
costs the same or better as what we did in 7.4.  It's clear though that
8.2 is taking some kind of big hit in the index access in your case.
There's something very strange going on here.

You do have both lc_collate and lc_ctype set to C, right?  What about
database encoding?

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <12660.1175635265@sss.pgh.pa.us>
Permalink:  ../12660.1175635265@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12660.1175635265@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alexdeucher@gmail.com, mmoncure@gmail.com
  Subject: Re: postgres 7.4 vs 8.x redux: query plans
  In-Reply-To: <12660.1175635265@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox