| От | juanmime@ono.com |
|---|---|
| Тема | A simple question |
| Дата | |
| Msg-id | 422CFD5E0000774A@resmta04.ono.com обсуждение исходный текст |
| Список | pgsql-admin |
Hello, I wonder if postgres autocreates an index on foreign or primary key fields. For example: create table t1 ( f1 integer, f2 varchar, primary key (f1)); create table t2 ( f1 integer, f2 integer, primary key (f1), foreign key (f2) references t1(f1) ); In this sample, "t1" has a primary key, and "t2" both (primary and foreign keys). Does postgres create each indexes for the primary key of "t1" and "t2" ? and indexes for "f2" field in "t2" ? I expleain, there are several DBMS where autocreates these indexes for you, and others that shows you an alert, for example, if you don't create an unique index for the primary key. Thanks.
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера