|
|
 |  |
Difference between 2 QueryFrom: Jyoti.Rath@iflexsolutions.com Date: Thursday, November 13, 2003
Time: 6:50:32 am
SELECT 1 FROM DUAL
WHERE EXISTS (SELECT SWIFT_ID
FROM CUSTOMRS
WHERE CUST_ID =3D 'ABCXXX'
AND OFFICE =3D 'XX'
AND DEPARTMENT =3D 'XX')
=20
-------
=20
SELECT count(*)
FROM CUSTOMRS
WHERE CUST_ID =3D 'ABCXXX'
AND OFFICE =3D 'XX'
AND DEPARTMENT =3D 'XX'
=20
If record doesnot exist then both will take same time.
if record exist then first one will take less time because it will not =
scan whole table.
=20
And any other reasons are there between this queries .
Jyoti
DISCLAIMER:
This message contains privileged and confidential information and is =
intended only for the individual named.If you are not the intended =
recipient you should not disseminate,distribute,store,print, copy or =
deliver this message.Please notify the sender immediately by e-mail if =
you have received this e-mail by mistake and delete this e-mail from =
your system.E-mail transmission cannot be guaranteed to be secure or =
error-free as information could be =
intercepted,corrupted,lost,destroyed,arrive late or incomplete or =
contain viruses.The sender therefore does not accept liability for any =
errors or omissions in the contents of this message which arise as a =
result of e-mail transmission. If verification is required please =
request a hard-copy version.
DISCLAIMER:
This message contains privileged and confidential information and is =
intended only for the individual named.If you are not the intended =
recipient you should not disseminate,distribute,store,print, copy or =
deliver this message.Please notify the sender immediately by e-mail if =
you have received this e-mail by mistake and delete this e-mail from =
your system.E-mail transmission cannot be guaranteed to be secure or =
error-free as information could be =
intercepted,corrupted,lost,destroyed,arrive late or incomplete or =
contain viruses.The sender therefore does not accept liability for any =
errors or omissions in the contents of this message which arise as a =
result of e-mail transmission. If verification is required please =
request a hard-copy version.
----------------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.digitalpoint.com/lists/oracle.html
----------------------------------------------------------
|

Return to Digital Point Solutions' Home Page |