Attempting to do anything else (like sorting and selecting the record with rank 1) would result in the same execution time (or worse!!). I think we will have to settle with MAX only
Main Topics
Browse All TopicsI am using select max(date) in a subquery and it is taking a while to return the results of the query. The amount of records that is being return are approximately 17,000 records. Is there another alternative to using select(max) to get the latest date for a user set of records that would speed up performance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This is a sample of my query:
SELECT master_lectures.etl_lectur
master_tasklist_versions.n
lecture_versions.title,
lecture_types.name lecture_type,
get_department (p.emp_id) department,
get_emp_name (p.emp_id) emp_name,
ethic_group_lectures.compl
ethic_group_lectures.hours
ethic_group_lectures.instr
ethic_group_lectures.expir
ethic_group_lectures.notif
DECODE (
(ethic_group_lectures.expi
- ABS (ethic_group_lectures.expi
0,
'CURRENT',
'EXPIRED'
)
status
FROM ethic_group_lectures,
ethic_lectures,
lecture_versions,
master_lectures,
master_tasklist_versions,
master_tasks,
master_tasklist_types,
lecture_types,
people p,
people_assignments pa,
department
WHERE master_tasklist_types.name
AND ethic_group_lectures.itl_g
ethic_lectures.itl_group_l
AND lecture_versions.etl_lectu
ethic_group_lectures.etl_l
AND lecture_versions.ndm_lectu
lecture_types.ndm_lecture_
AND lecture_versions.etl_lectu
master_lectures.current_ve
AND lecture_versions.etl_lectu
master_lectures.production
AND master_lectures.etl_lectur
lecture_versions.etl_lectu
AND p.emp_id = ethic_lectures.emp_id
AND ethic_group_lectures.depar
department.department_id
AND p.emp_id = pa.emp_id
AND ( (p.checked_in_reporting_id
AND pa.department_id =
ethic_group_lectures.depar
OR (p.orders_to_assign_id = pa.per_assignment_id
AND pa.department_id =
ethic_group_lectures.depar
AND master_tasks.etl_task_targ
AND master_tasklist_versions.n
master_tasklist_types.ndm_
AND master_tasklist_versions.e
master_tasks.etl_tasklist_
AND ethic_group_lectures.compl
(SELECT MAX (el.completion_date)
FROM ethic_group_lectures el,
ethic_lectures etl,
lecture_versions lv,
master_lectures etl_l
WHERE el.itl_group_lecture_id =
etl.itl_group_lecture_id
AND el.etl_lecture_version_id =
lv.etl_lecture_version_id
AND lv.etl_lecture_id = etl_l.etl_lecture_id
AND etl.emp_id = p.emp_id
AND etl_l.etl_lecture_id =
master_lectures.etl_lectur
cookiejar,
did you try my suggestion from http://#a24926762 ?
Business Accounts
Answer for Membership
by: pssandhuPosted on 2009-07-23 at 09:01:43ID: 24926734
That would be best way I am afraid. Can you post your query so we can look to see if we can make any changes to speed things up?
P.