constraint performance

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема constraint performance
Дата
Msg-id 3E9335F1.6010602@selectacast.net
обсуждение исходный текст
Ответы Re: constraint performance  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
create table taba( id int PRIMARY KEY, name text);
create table tabb( rid int PRIMARY KEY REFERENCES taba(id));

insert into taba values (1,'1');
insert into taba values (2,'2');

insert into tabb values(1);

explain delete from taba where id = 1;
explain delete from taba where id = 2;

The explain doesn't show any checking of the constraint, but the checking is done
somewhere.  How much does the checking cost?  If I delete any value from taba does it
check tabb to see if that row is refrenced, is something marked in the taba row to
indicate it is refrenced?  If I update taba does it check only if I update id, or will it
check no matter what field I update?


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Is the += or *= operator used in PostgreSQL ?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Cross database reference (databases are on the same