taking more time to retreive data ?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: taking more time to retreive data ?

  1. #1
    Join Date
    May 2001
    Location
    singapore
    Posts
    19
    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
    thanx with regards,
    Raj

  2. #2
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    342
    1.
    instead off issuing the same statement 800 time,
    use a group by clause in your statement.

    eg.
    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

    2.
    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
    Gert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width