Search Postgresql Archives

Re: Problem with index not being chosen inside PL/PgSQL function...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 18, 2007 10:54 AM, Weber, Geoffrey M.
<Geoffrey.Weber@xxxxxxxxxxxxx> 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?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux