Re: Planner Row Estimate with Function

Поиск
Список
Период
Сортировка
От Michael Fork
Тема Re: Planner Row Estimate with Function
Дата
Msg-id 724478.95132.qm@web59002.mail.re1.yahoo.com
обсуждение исходный текст
Ответ на Re: Planner Row Estimate with Function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
That solved it.
 Thanks!


Michael



----- Original Message ----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Fork <mfork00@yahoo.com>
Cc: pgsql-general@postgresql.org
Sent: Tue, December 29, 2009 11:19:42 PM
Subject: Re: [GENERAL] Planner Row Estimate with Function

Michael Fork <mfork00@yahoo.com> writes:
>> Also, what happened to the type='CREDIT' condition in your query?  Is
>> that a partial index?

> Yes, this is partial index.  I should have included the index definition earlier:

Ah.  The optimizer is ignoring the index stats on the grounds that
they are not representative of the whole table.  I'm not entirely sure
offhand whether it would be safe to use them anyway if the index
predicate is known to match the query --- it seems a bit risky but on
the other hand it'd probably be better than having no stats at all.

What you can do to get a better estimate is to create a non-partial
index on parsecardidfromreferencecode(reference_code).  It's fairly
likely that if you do that, maintaining the partial index as well
is not worth your time; but that's a decision you'd have to make.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Planner Row Estimate with Function
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Installation of Postgis/postgresql