Re: Performance penalty when using WITH

Поиск
Список
Период
Сортировка
От Robert Klemme
Тема Re: Performance penalty when using WITH
Дата
Msg-id CAM9pMnPkFrubkrxWF1+tmJ7vWadxS2LP_i9d9VO-GuEmPsL4oQ@mail.gmail.com
обсуждение исходный текст
Ответ на Performance penalty when using WITH  (Li Jin <ljin@tripadvisor.com>)
Список pgsql-performance
On Wed, Aug 3, 2011 at 3:27 PM, Li Jin <ljin@tripadvisor.com> wrote:
> Robert,
> I've built an index on this expression firstname || ' ' ||
> substring(lastname,1,1). I believe this is the best index for this
> particular query. Correct me if I am wrong.

Maybe, maybe not.  Difficult to tell from a distance.  I would have an
index on (firstname, lastname).  You could try that and look at the
plan for the other query.  That's the only ultimate test which will
give you hard facts.

Kind regards

robert


--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: GROUP BY with reasonable timings in PLAN but unreasonable execution time
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Performance penalty when using WITH