Skip site navigation (1) Skip section navigation (2)

Re: Index not being used for UPDATE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index not being used for UPDATE?
Date: 2011-04-27 17:40:18
Message-ID: 5975.1303926018@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> writes:
> Just want to check why, in an UPDATE sql, the JOIN condition is not making
> use of the index?
> [ whole-table update done with a hash join ]

That's a perfectly good plan.  Indexes typically help only when you want
to process just part of a table.

If you don't believe it, you can try forcing a different plan to be
chosen (see enable_hashjoin et al), but more than likely it'll be
slower.

			regards, tom lane

In response to

pgsql-general by date

Next:From: Andy ColsonDate: 2011-04-27 17:44:58
Subject: Re: Index not being used for UPDATE?
Previous:From: Andy ColsonDate: 2011-04-27 17:40:08
Subject: Re: Needs Suggestion

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group