How to tune SQL query [message #19957] |
Sun, 21 April 2002 18:31 |
Rajesh Mohan
Messages: 3 Registered: April 2002
|
Junior Member |
|
|
Hi,
Sorry for giving wrong query in my last message. I am using max() not sum(). Actually my query is
select roll_no,max(expiry_date) from v_master
group by roll_no
having max(expiry_date)<=sysdate;
Thia v_master table is having 6 million records and this query is taking more than 4 minutes.
roll_no is of number datatype and expiry_date is date datatype.
Please provide me some solution to make it fast.
Thanks & Regards
Rajesh Mohan
|
|
|
|