hi Sanjay
actually wht is your requirement
whether to find record where the max date for a group number is <=against a
supplied date
or to find max date which is less than a supplied date
select grp_id,max(date) from ..
group by grp_id
having max(date)<given date
any way give your query then only we can give better solution
dhanya
-----Original Message-----
From: sanjay
[mailto:oracledba-ezmlmshield-x94453641.[Email address protected]
Sent: Wednesday, August 18, 2004 8:54 AM
To: LazyDBA Discussion
Subject: Query Performance -- requires urgent inputs
Hi,
Kindly provide some inputs on this situation
Table:
grp_id e_number date
1 123 12-10-2003
1 124 11-10-2003
1 134 10-10-2004
2 11 11-11-2002
2 14 12-11-2003
grp_id,e_number,date is primary key
This table contains around 170 Million recs... I need to pick record where
the max date for a group number is <=against a supplied date
this record needs to be joined with another table on the basis of grp_id..
If I use a correlated query the process simply hangs... Is there any better
way of doing it..
Pls give your valuable inputs..
Thanks and Regards
Confidentiality Notice
The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[Email address protected] immediately
and destroy all copies of this message and any attachments.
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page