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,
Raj