| От | Culley Harrelson |
|---|---|
| Тема | Multi-key indexes |
| Дата | |
| Msg-id | 9aq40k$2v8g$1@news.tht.net обсуждение |
| Список | pgsql-general |
Hi, I wanted to verify the behavior of multi-key indexes. I have this table: create table fe_group_member( group_id int4 not null references fe_group(group_id) on delete cascade, user_id int4 not null references fe_user(user_id) on delete cascade, ins_date timestamp not null default 'now', primary key(group_id, user_id) ); Now if I do: select * from fe_group_member where group_id = 1; I think the index created by the primary key will be used. Is this correct? And if I do: select * from fe_group_member where user_id= 1; then the primary key index will not be used and I need to create an index on user_id for better performance. Do I have this right? Culley
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера