Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first matching record???

Re: Getting the first matching record???

From: g.r.s. deisz <g.r.s.deisz_at_ptt-telecom.unisource.nl>
Date: 1997/04/17
Message-ID: <5j4gis$1q4@hdxl16.telecom.ptt.nl>#1/1

>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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US