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

Home -> Community -> Usenet -> c.d.o.tools -> SQL Performance Tuning--do the right thing

SQL Performance Tuning--do the right thing

From: mr_oatmeal <mr_oatmeal_at_hotmail.com>
Date: Tue, 21 Nov 2000 20:30:21 -0000
Message-ID: <t1lmqto65icb14@corp.supernews.com>

Hi I'm taking over some code that was writen by a contractor...and I need to go through and improve the embedded sql stmnts. I've been doing so to the best of my knowledge...then i run accross something like this. For performance, would it be more efficient to use the in clause rather than the OR. (both return the same data)

Are there any other hints/tips that you can give me for improving performance, things that kill the use of the index, anything would help-- we don't have a dba. I've been reading a book called Oracle SQL High Performance Tuning. If you know of any others please send 'em.

SELECT author_code, first_name
FROM table
WHERE status = 'author'

OR  status = 'columnist'
OR  status = 'deputy bureau chief'
OR  status = 'bureau chief'


SELECT author_code, first_name
FROM table
WHERE status IN ('author','columnist','deputy bureau chief','bureau chief')

mr_oatmeal

--

Posted via CNET Help.com
http://www.help.com/ Received on Tue Nov 21 2000 - 14:30:21 CST

Original text of this message

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