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

Поиск
Список
Период
Сортировка
От Weber, Geoffrey M.
Тема Re: Problem with index not being chosen inside PL/PgSQL function...
Дата
Msg-id 70E5EDFC9C7458478029E57C47FC0B830E59500A0B@MAILCLUSTER1.mcld.net
обсуждение исходный текст
Ответ на Re: Problem with index not being chosen inside PL/PgSQL function...  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
OK - in that same vain, I thought of something even better - using dynamic SQL instead.  It sped things up right away!

Thanks for putting me on the right track!


________________________________________
From: Scott Marlowe [scott.marlowe@gmail.com]
Sent: Tuesday, December 18, 2007 12:02 PM
To: Weber, Geoffrey M.
Cc: Tom Lane; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL       function...

On Dec 18, 2007 10:54 AM, Weber, Geoffrey M.
<Geoffrey.Weber@mcleodusa.com> wrote:
> Tom,
>
> Yes, the distribution must be what's doing it.  I guess I knew that subconciously, but was looking for something like
hintsto 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?

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s)
named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this
transmissionin error, please notify the sender via e-mail. 




NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s)
named. Any use, copying, or disclosure by any other person is strictly prohibited. If you have received this
transmissionin error, please notify the sender via e-mail. 

В списке pgsql-general по дате отправления:

Предыдущее
От: Benoît Carpentier
Дата:
Сообщение: free ETL tool using postgreSQL, new major release
Следующее
От: "hjenkins"
Дата:
Сообщение: combining semi-duplicate rows