Alright, after searching up and down on google, asking fellow workers and looking on here. I can't quite find an answer to a problem I'm having. I have a basic statetment in oracle that is doing a select from three columns of a database using the user params as 'the search words'. I'm trying to figure out how to get the query to 'stop' once it finds 1 record. (As thats all it needs to do, is match one record and stop - Dont keep looking in the database.)
Select a, b , c from database where a = param1 and b = param2 and c = param3
The reason I'm trying to limit the results to one record even is because the query seems kinda of slow. Here is an example of what I have tried to do when it comes to 'limiting'
Select a, b , c, rownum from database where a = param1 and b = param2 and c = param3 and rownum < 2
I'm not so sure this "stops" oracle from processing the statement? So my basic question is
How can i get oracle to stop "searching" once its found ONE record?Thank you for the assistance you can provide.
that stops it, you got it.