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

Home -> Community -> Usenet -> c.d.o.server -> Re: Tuning : Where clause

Re: Tuning : Where clause

From: A. Fischer <acf34_at_yahoo.com>
Date: Fri, 25 Sep 1998 13:30:10 -0700
Message-ID: <6ugu8p$8r7$1@excalibur.flash.net>


Queries are evaluated from the bottom up (and right to left). Put your most restrictive clause at the end - in other words, the clause that rules out the most records being returned.
a_andy_at_my-dejanews.com wrote in message <6udtkt$jlq$1_at_nnrp1.dejanews.com>...
>I have a table account(ac_code,ac_date,acd_exp_date,ac_flag.....) and the
>primary key of the table ac_code. Now when I write a query
>"Select .... from account where ac_code = '123' and
>ac_date between .. and ..
>and ac_exp_date < ..
>and ac_flag = 'A'"
>
>Which would be the best position for ac_code field condition in the where
>clause. If it the first condition in where clause , will oracle stop
looking
>for further conditions for the recrods which don't have ac_code = '123' ??
>
>Thanks.
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Fri Sep 25 1998 - 15:30:10 CDT

Original text of this message

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