Forcing use of specific index

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Forcing use of specific index
Date: 2005-06-02 02:05:28
Message-ID: 20050602020528.GL26100@tobias.exoweb.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Is it any way to attempt to force the planner to use some specific index
while creating the plan? Other than eventually dropping all the other
indices (which is obiously not a solution in production setting anyway)?

I have one case where I have added 16 indices to a table, many of them
beeing partial indices. The table itself has only 50k of rows, but are
frequently used in heavy joins. I imagine there can be exponential order on
the number of alternative paths the planner must examinate as function of
the number of indices?

It seems to me that the planner is quite often not choosing the "best"
index, so I wonder if there is any easy way for me to check out what the
planner think about a specific index :-)

--
Tobias Brox, Beijing

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stacy White 2005-06-02 03:42:58 Adaptec/LSI/?? RAID
Previous Message John A Meinel 2005-06-01 21:27:48 Re: Moving pg_xlog