Re: Why does the query planner use two full indexes, when a dedicated partial index exists?

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: Richard Neill <rn214(at)richardneill(dot)org>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Why does the query planner use two full indexes, when a dedicated partial index exists?
Date: 2012-12-19 22:59:39
Message-ID: CAL_0b1s6_YZDdzt3NizwC8X+dYA37T-4aZOTzw3KJ3-iXuSjjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

On Wed, Dec 19, 2012 at 1:13 PM, Richard Neill <rn214(at)richardneill(dot)org> wrote:
> Index Scan using tbl_tracker_performance_1_idx on tbl_tracker
> (cost=0.00..5440.83 rows=1 width=174) (actual time=0.052..0.052 rows=0
> loops=1)
> Index Cond: (parcel_id_code = 53030)

It looks like your index is bloated. Have you had a lot of
updates/deletes on rows with exit_state is null?

Try to reindex tbl_tracker_performance_1_idx.

To reindex it without locks create a new index with temporary name
concurrently, delete the old one and rename the new one using the old
name.

--
Sergey Konoplev
Database and Software Architect
http://www.linkedin.com/in/grayhemp

Phones:
USA +1 415 867 9984
Russia, Moscow +7 901 903 0499
Russia, Krasnodar +7 988 888 1979

Skype: gray-hemp
Jabber: gray(dot)ru(at)gmail(dot)com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Richard Neill 2012-12-19 23:49:34 Re: Why does the query planner use two full indexes, when a dedicated partial index exists?
Previous Message Richard Neill 2012-12-19 21:13:06 Why does the query planner use two full indexes, when a dedicated partial index exists?