Re: Returned mail: User unknown
From: Alexandr I. Alesinsky <al_at_investor.kharkov.ua>
Date: 1995/05/17
Message-ID: <AB81RklihF_at_investor.kharkov.ua>#1/1
Date: 1995/05/17
Message-ID: <AB81RklihF_at_investor.kharkov.ua>#1/1
> tmaxwell_at_crl.com (Anthony B. Cillo) wrote:
> : I am trying to find the oldest 1000 patients in our database. The
> : problem is that I cannot get the system to stop after returning 1000
> : rows. I have tried using rownum but that only works if you are not
> : using order by.
> :
> : Any ideas?
> :
I believe that the easiest and most efficient way to solve your problem is the following one:
- Index your database on age of your patients into patint_ages index.
- Use a optimizer hint in your SELECT in conjuction with rownum, e.g.
SELECT /*+INDEX_DESC(patients pattient_ages */ patient_name, age FROM patients where rownum <1001;
Alexandr Alesinsky
JSV Investor
Received on Wed May 17 1995 - 00:00:00 CEST