Search Postgresql Archives

Partial indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In 8.1.2.

Table contains columns:
	keyp1 not null, keyp2 not null, keyp3 nullable.

The queries will be separated into two kinds:
one on those rows where keyp3 is null and
the second on where keyp3 is not null.

I think I want to:
	create unique index pk on table tbl (keyp1, keyp2);
	create unique index range on table tbl (keyp1, keyp2, keyp3) where keyp3 is not null;

Are these indexes redundant given uniqueness requirement and the type of queries
that will be run against the table?  I don't think a non-unique index over
all three columns be adequate given the uniqueness constraints.

Opinions?

Thanks,

elein
elein@xxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux