Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> compression of tables
Hi,
suppose that we have 4 tables:
--> t1 : t1_id (pk), t1_info
--> t2 : t2_id (pk), t2_info, t2_t1_id (foreign key)
--> t3 : t3_id (pk), t3_info, t3_t1_id (foreign key)
Suppose that we have 1 millions of records in t1,
5 millions of records in t2, 4 millions of records in t3the goal is to compress these data in this case we process like this
If n ( n > 1) records in t1 have the same t1_info, and the same set of info in both tables
t2 and t3 then we will delete cascade (n-1) rows from t1
e.g. :
t1 : t1_id t1_info 1 'car' 2 'car' 3 'car' 4 'van' t2 : t2_id t2_info t2_t1_id 1 'tyre' 1 2 'brake' 1 3 'tyre' 2 4 'brake' 2 5 'tyre' 3 6 'brake' 3 7 'capacity' 4 t3 : t3_id t3_info t2_t1_id 1 'price' 1 2 'power' 1 3 'price' 2 4 'power' 2 5 'price 3 6 'power' 3 7 'power' 4
In this case we delete on cascade only t1_id = 2 and t1_id = 3 from t1
I am writing the function and I have a big problem of performance, You are helpful for each idea you give to me!
thanks .. Received on Tue Apr 23 2002 - 10:25:59 CDT