Re: Optimisation, index use question [long]

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Optimisation, index use question [long]
Дата
Msg-id 20030713141134.GC16581@svana.org
обсуждение исходный текст
Ответ на Optimisation, index use question [long]  (Francois Suter <dba@paragraf.ch>)
Ответы Re: Optimisation, index use question [long]  (Francois Suter <dba@paragraf.ch>)
Список pgsql-general
On Sun, Jul 13, 2003 at 03:43:06PM +0200, Francois Suter wrote:
> Hi all,
>
> I am having my first try at optimizing the way queries are run on one of my
> databases and I'm having a few problems/questions.

Standard issue. When you specify an unquoted number in a query it's
interpreted as an int4 which doesn't match your indexes. Suggestions are:

- Put quotes around your numbers or   eg. '1'
- Cast them to the right type         eg. 1::bigint

Naturally you analysed, right?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
>   - Samuel P. Huntington

Вложения

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

Предыдущее
От: Francois Suter
Дата:
Сообщение: Optimisation, index use question [long]
Следующее
От: Richard Welty
Дата:
Сообщение: ./configure failing -- pgsql 7.3.3 install on solaris 8