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

Home -> Community -> Usenet -> c.d.o.misc -> What means my execution plan?

What means my execution plan?

From: <grrey_at_mail.ru>
Date: 3 Feb 2006 20:04:34 -0800
Message-ID: <1139025873.948264.301560@g47g2000cwa.googlegroups.com>


There is a tables:

create table stat -- about 2,000,000 records and 500,000 records with finish_date is null
(

  User_id number,
  Start_Date date,
  Finish_Date date
)

create table log --about 15,000,000 records
(

  Msg_id number primary key,

  User_id number,
  Kind_id number(1),
  Date_time date,

  Rec_type
)

There is an index on log table:

Create index Log_indx on log(User_id,Kind_id,Rec_type,Date_time)

I'm starting folowing query:

select count(1) from stat_phone a
 where finish_date is null
   and not exists
   (

     select 1 from general_log
      where phoneto=a.phone
        and phonefrom=9152
        and Date_time>a.start_date

   )

And Explane plan shows me plan:

SELECT STATEMENT, GOAL = CHOOSE
 SORT AGGREGATE
  FILTER

   TABLE ACCESS FULL	STAT
   INDEX RANGE SCAN	LOG_INDX					4

The question is - What's the hell oracle doing here? This should be fast query, but it makes already 2 hours. And another question - How to make it faster? Received on Fri Feb 03 2006 - 22:04:34 CST

Original text of this message

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