Re: Some mystery with execution plans on postgres 8.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Boguk Maxim <astar(at)rambler-co(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Some mystery with execution plans on postgres 8.1
Date: 2006-06-07 18:31:18
Message-ID: 15944.1149705078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Boguk Maxim <astar(at)rambler-co(dot)ru> writes:
> If short: adding index to table change execution plans on query which dont
> use new index.

After some experimentation I was able to create a similar misbehavior
here. I think what is happening is that the added index is capturing
the bitmap scan plan, even though it ends up making that plan more
expensive and thus a loser to the plain indexscan. The reason is this
bug:
http://archives.postgresql.org/pgsql-committers/2006-06/msg00064.php
which makes choose_bitmap_and sort the available indexes in the wrong
order.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2006-06-07 18:33:47 Re: GPL Licensed Files in 8.1.4
Previous Message Tim Hart 2006-06-07 17:57:15 Re: What are the characteristics of a good user-defined data type?