From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Weber, Geoffrey M(dot)" <Geoffrey(dot)Weber(at)mcleodusa(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Problem with index not being chosen inside PL/PgSQL function... |
Date: | 2007-12-18 18:02:27 |
Message-ID: | dcc563d10712181002j543165ddk75e967ff87d23875@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Dec 18, 2007 10:54 AM, Weber, Geoffrey M.
<Geoffrey(dot)Weber(at)mcleodusa(dot)com> wrote:
> Tom,
>
> Yes, the distribution must be what's doing it. I guess I knew that subconciously, but was looking for something like hints to force the planner to do what I wanted. Instead it looks like I'll have to do a bit of tweaking with my indexes. Probably a partial index on the 'not_displayed_id' column. It'll be very small and shouldn't cause much overhead. I was trying to keep my index count down, and have had a dual-column index on (replaced_by_id, not_displayed_id) to this point.
Fix not with a hammer that which you can fix with a screwdriver. Fix
not with a screwdriver that which you can fix with a knob
Have you tried increasing the stats target of the guilty column and
reanalyzing to see if that helps?
From | Date | Subject | |
---|---|---|---|
Next Message | Benoît Carpentier | 2007-12-18 18:32:03 | free ETL tool using postgreSQL, new major release |
Previous Message | Nathan Wilhelmi | 2007-12-18 17:16:53 | Specify client encoding for backups... |