Re: Performance question

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: Performance question
Дата
Msg-id CA+bJJbwzmxM4o6NN9i7TiY1P+c4Gz3KaE9iHLvMLs5TL1pRFGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Performance question  (Anil Menon <gakmenon@gmail.com>)
Список pgsql-general
Hi Anil:

On Wed, Nov 19, 2014 at 5:26 PM, Anil Menon <gakmenon@gmail.com> wrote:
Cons : It seems doing a count(*) is not the best option for PG

For this and some of the following options,  if you are going to just test for existence, I would consider adding a limit 1 somewehere on the query, to let the optimizer know you only need one and it will abort the scan on first hit. Probabley not needed if you are going to give a query which uses an unique index, but it shouldn't hurt.

Francisco Olarte.

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

Предыдущее
От: Anil Menon
Дата:
Сообщение: Performance question
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Performance question