Re: 7.4 - FK constraint performance

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: 7.4 - FK constraint performance
Дата
Msg-id 1076680640.10896.15.camel@jester
обсуждение исходный текст
Ответ на Re: 7.4 - FK constraint performance  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
> In this precise example, could you not:
>   1. Check index for value
>   2. If found, seq-scan
>
> Of course that's only going to be a sensible thing to do if you're expecting
> one of two results:
>   1. Value not there
>   2. Lengthy seq-scan if it is there

Most of the queries are going to be for the other values (in which case
you've wasted an index scan) which is minor, but in the event there is a
single 239 you're still taking a big hit.

That is an awful lot of work to handle the non-existant case only.

--
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/rbtpub.asc

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

Предыдущее
От: "Greg Patnude"
Дата:
Сообщение: Re: determining how many products are in how many categories
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: 7.4 - FK constraint performance