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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Using 'In'...

Re: Using 'In'...

From: <renato.huliganga_at_au1.ibm.com>
Date: Thu, 15 Jun 2000 15:36:32 +1000
Message-Id: <10529.109365@fatcity.com>


Hi,

>update table1 set col1='x' where zip in ('650','737','850');

will be faster. The optimizer will transform it into:

update table1 ser col1='x' where zip = '650' or zip = '737' or
zip = '850';

i suggest you create an index on the 'zip' column. and make sure your rollback segments are big enough.

HTH
r

"Aldi Barco" <ipal_at_hotmail.com> on 15/06/2000 14:08:17

Please respond to ORACLE-L_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Renato Huliganga/Australia/IBM) Subject: Using 'In'...

Hi list,

For million of records table and non-indexed zip column, which one is faster
:

update table1 set col1='x' where zip='650';
update table1 set col1='x' where zip='737';
update table1 set col1='x' where zip='850';

OR

update table1 set col1='x' where zip in ('650','737','850');

Thanks.

Aldi
Oracle DBA



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
--
Author: Aldi Barco
  INET: ipal_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jun 15 2000 - 00:36:32 CDT

Original text of this message

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