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: Ȳ»ó±¸ <angra_at_ns.maninet.co.kr>
Date: Fri, 25 Sep 1998 06:35:14 GMT
Message-ID: <360B39F7.F17250A8@ns.maninet.co.kr>


hmm, I don't know your indexe structure except primery key. I think that should you use ac_code in where clause as first condition. The ac_code will used as filter because the ac_code is primery key and index, and then Oracle check next other where condition.

Check query plan.

SQL> set autotrace on;

You will see query plan.
Good luck.

a_andy_at_my-dejanews.com wrote:

> 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 - 01:35:14 CDT

Original text of this message

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