We are attempting to construct a policy which will restrict the number of rows we keep online in a table that looks like this: create table stuff ( a integer not null references other_a on delete cascade, b integer not null references other_b on delete cascade, c integer check (c >= 0), primary key (a,b,c) ); create index ix_stuff_1 on stuff (b); We do a lot of queries against this table using column b. Questions: 1) Would the primary key be more useful if defined as (b,a,c)? Would it remove the need for an index on b itself? 2) Is there a performance "elbow" in query times vs. number of rows in the table? (E.g., performance drops off dramatically at some number of records.) -- Jeff Boes vox 616.226.9550 Database Engineer fax 616.349.9076 Nexcerpt, Inc. jboes@nexcerpt.com
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера