Re: Slow Foreign Key

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Slow Foreign Key
Дата
Msg-id 20040323155308.GB22109@wolff.to
обсуждение исходный текст
Ответ на Re: Slow Foreign Key  (Ricardo Vaz Mannrich <rvm_l1@silcom.com.br>)
Список pgsql-admin
On Tue, Mar 23, 2004 at 08:32:30 -0300,
  Ricardo Vaz Mannrich <rvm_l1@silcom.com.br> wrote:
> Both indexed...
>
> But... When I try EXPLAIN SELECT * FROM detail WHERE master_id = XXXXXX;
> PostgreSQL uses seq scan (why?)

This has been discussed many times previously and if you want to understand
why things are this way search the archives.

Things will work better in 7.5.

For the time being quoting XXXXX will solve your problem as it will
allow the constant to get the same type as master_id.

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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Cache loolup failed problems with tsearch following
Следующее
От: "Rob Anderson"
Дата:
Сообщение: Testing for existence of a record before insert