| От | Tom Lane |
|---|---|
| Тема | Re: a question for the way-back machine |
| Дата | |
| Msg-id | 12474.1166048924@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: a question for the way-back machine (Ben <bench@silentmedia.com>) |
| Список | pgsql-general |
Ben <bench@silentmedia.com> writes:
> Wouldn't it need to check the unique constraint (an index on the table)
> before the insert can succeed? It seems like it would be better to check
> the index than to do a full table scan to try to satisfy that constraint.
Postgres contains no code that would even consider doing a seqscan for a
uniqueness check; it could not work because of race-condition considerations,
never mind performance.
You have not given us any clue about where the seqscans are really
coming from ... have you got any user-defined triggers, SQL functions in
CHECK constraints, stuff like that?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера