Slow about join [message #25942] |
Wed, 28 May 2003 00:37 |
happyhero
Messages: 10 Registered: April 2002
|
Junior Member |
|
|
Hi
How are you! I met the question and need your help.
there are two tables A and B.
table A fields: af1 ,af2 ,af3;
table B fields: bf1 ,bf2 ,bf3;
relation condition:
A.af1 like b.bf2 || '%'.
table A have 1000000 records every day.
table B have 4000 records.
in result:
insert table temp from
select a.af2, b.bf2 from
a left join on a.af1 like b.bf2 || '%';
It need 4 minute when to select one minute data.
this is slow.
How do i?
is it possible that when a's record get the first relation record from b then return?
Please help me! thanks!
|
|
|
Re: Slow about join [message #25952 is a reply to message #25942] |
Wed, 28 May 2003 06:40 |
Phenoracle
Messages: 35 Registered: March 2001
|
Member |
|
|
There are many ways around your issue
One you could look at Pl/Sql as a solution to break up your transaction into small ones.
Also is b.bf2 unique if not an in-line view could of help.
Have fun Phenoracle
|
|
|
Re: Slow about join [message #25967 is a reply to message #25952] |
Wed, 28 May 2003 19:27 |
happyhero
Messages: 10 Registered: April 2002
|
Junior Member |
|
|
thanks.
b.bf2 is unique for table a.
I am testing speed with Pl/Sql. but I think it is same speed with single sql.
thanks again.
wangyong.
|
|
|