RE: Unique Index Re-design

  • From: Sayan Sergeevich Malakshinov <malakshinovss@xxxxxxxxx>
  • To: mohamed.houri@xxxxxxxxx
  • Date: Fri, 28 Mar 2014 14:19:06 +0400

Hi Mohamed,

> create unique index mho_ind on t4 (case when a = 90996518  then null 
else a end, case when b is not null then b end);

Strictly speaking, "case when b is not null then b end" will have same 
values as just simple "b"
And you will need to rewrite predicates(or maybe create view like "create 
view t4 select case when a = 90996518  then null else a end as A, ... from 
old_t4" )

> When I asked the client what is the particularity of this a value 
(90996518) he answered that this a dummy value used for testing (yes for 
testing 
> in PRODUCTION). 

Am i right that all rows with such value are just dummy rows? In that 
case, i think, we could consider table partitioning with separation dummy 
rows from others and local indexing.

--
Best regards,
Sayan Malakshinov
http://orasql.org

Other related posts: