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: rewrite the sql query

Re: rewrite the sql query

From: <ngroves_at_ndsuk.com>
Date: Fri, 21 May 1999 15:04:23 GMT
Message-ID: <7i3sll$u2l$1@nnrp1.deja.com>


In article <01bea2eb$e9c57a00$b409eec3_at_default>,   "GDN" <gert.deneve_at_advalvas.be> wrote:
> Create the table "plan_table" using utlxplan.sql
>
> Add before the sql statement explain plan set statement_id = 'XX' for
>
> select the lines from the table plan_table where statement_id = 'XX'
> This will give you an explanation how the statement is executed by the
> server.
>
> Gert
>
> dmarsha3 <dmarsha3_at_csc.com> wrote in article
<7i1got$ecq$1_at_lore.csc.com>...
> >
> > Group:
> >
> > I have the following sql query
> >
> > select
> > f.folder_id, rd.pr_number,c.contract_number,
> >

p.nsn,rsa.solicitation_number,c.contractor_cage,f.archive_status_flag,
> > f.folder_obj_id,
> > f.gdms_instance_nm, f.frag_id
> > from
> > ecf_folder f,ecf_contract_data c,ecf_folder_req_assoc fra,
> > ecf_requisition_data rd,
> > ecf_req_soli_assoc rsa, ecf_pr_nsn_assoc p
> > where
> > f.folder_id=c.folder_id(+) and
> > f.folder_id=fra.folder_id(+) and
> > fra.ecf_req_data_seq_id=rd.ecf_req_data_seq_id(+) and
> > rd.ecf_req_data_seq_id=rsa.ecf_req_data_seq_id(+) and
> > fra.ecf_req_data_seq_id = p.ecf_req_data_seq_id(+);
> >
> > It's taking around 16 seconds right now.
> > I would like to speed up this query is there any other method to
do it.
> >
> > Any help is appreciated.
> >
> > rama
> > rkolluru_at_csc.com
> >
>

Theres an easier way if you are using sqlplus (not sqlworksheet) - grant the role plustrace to the user & set autotrace on in sqlplus - this eliminated the need to mess about with the plan table.

nigel groves

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Fri May 21 1999 - 10:04:23 CDT

Original text of this message

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