it taking more time to get retreive data from remote database.my sql query is
select sum(b_date,e_date)*60*60*60 from t_table where
b_date >='02-may-2001' and e_date <'31-may-2001' and user_id='x000021';
time take =3 minutes.
there are abut 1.7 million records in datebase.
and i have a list of 800 user_id's for which i need to calculate time .
am on linux machine and the remote database(orale 8i) is on sunOS.network speed is quite fine bwt(from server can be some wat 80mbps)
i guess it 'll take abut 5 das if i run perl script.
is there ne way out?
how can i reduce my processing time?
thanx with regards,
instead off issuing the same statement 800 time,
use a group by clause in your statement.
select user_id,sum(b_date,e_date)*60*60*60 from t_table where b_date >='02-may-2001'
and e_date <'31-may-2001'
group by user_id
you say 'remote db', but I do not see it in the from clause.
If indeed it is ... from t_table@remote_db ...
I haven't tried it yet, but maybe you can speed up your query by using the 'DRIVING_SITE' hint.
goal : tell the optimizer to run the statement on the remote db, and only send the results over the network.
Hope this helps
Click Here to Expand Forum to Full Width