--- Pandu Pradhana <[EMAIL PROTECTED]> wrote:

> Dear para master oracle,
>    
>   Saya ada masalah dengan query yang saya jalankan.
> Query ini di jalankan di table yang ukurannya cukup
> besar sekitar 40jt record. 
>    
>   select trunc(mt.c), mt.b, ss.c, count(*) total
> from mt, ss
> where mt.a = ss.a and 
>    mt.c between to_date(P_FROM_DATE, 'yyyy-mm-dd')
> and to_date(P_TO_DATE, 'yyyy-mm-dd') and 
>    mt.b between 1100 and 1199
> group by trunc(mt.c), mt.b, ss.c
> order by trunc(mt.c) asc, mt.b asc, ss.c asc
>    
>    
>   Saya sudah buat index di mt.a, ss.a dan compund
> index (mt.b, mt.c)
>   Untuk eksekusi-nya kenapa membutuhkan waktu yang
> sangat lama sekali? bisa seharian, sampai harus
> di-kill process-nya. Saya liat di OEM juga buka
> merupakan "Long Operation" process. 
>    
>    
>   Terima kasih atas masukkannya
>    
>   Regards,
>   --Pandu
>    
>
coba untuk table mt buat index nya di trunc juga ;

create index mt_idx1 on  mt (a,trunc(c))

semoga membantu

Imansyah




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.lizt.org (NEW)
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke