Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first matching record???
>Z. Martinez <zlm101_at_psu.edu> escreveu no artigo
><334bd241.9605767_at_news.cac.psu.edu>...
>>
>> I have a large table (about 4 million rows) that I need to search
>> through. Although the query I'm using can result to multiple rows, I
>> only need the first matching row. This query will be executed probably
>> a hundred thousand times. So I really need to optimize it
>>
>> What is the most efficient way of getting the first matching record
>> PL/SQL? and Pro*C?
>>
>> Thanks in advance.
Add "AND ROWNUM = 1" to the where-clause.
Stefan.
Name :G.R.S. Deisz Phone :+31-50-5855954 E mail :G.R.S.Deisz_at_PTT-Telecom.Unisource.NL DISCLAIMER:This statement is not an official statement from, nor does it represent an official position of, PTT Telecom BV.Received on Thu Apr 17 1997 - 00:00:00 CDT
![]() |
![]() |