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: Jack Silvey <JSilvey_at_XOL.com>
Date: Thu, 15 Jun 2000 10:39:03 -0500
Message-Id: <10529.109426@fatcity.com>


Hey Aldi,

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

would probably be faster since you would perform only one FTS rather than three.

Run explain plan with tables analyzed to find out for sure what the costs will be.

Jack
ocp x 2
senior @ xol.com

-----Original Message-----
From: dgoulet_at_vicr.com [mailto:dgoulet_at_vicr.com] Sent: Thursday, June 15, 2000 9:38 AM
To: Multiple recipients of list ORACLE-L Subject: Re:Using 'In'...

Depending on the version of Oracle, 'in' gets interpreted as:

select x from <table> where zip = '650'
union select x from <table> where zip = '737' union select x from <table> where zip = '850'

Consequently neither method may be more efficient.

____________________Reply Separator____________________
Author: "Aldi Barco" <ipal_at_hotmail.com>
Date:       6/14/00 8:08 PM

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). -- Author: INET: dgoulet_at_vicr.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
Received on Thu Jun 15 2000 - 10:39:03 CDT

Original text of this message

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