agus sulaiman wrote:

>Kepada Teman-teman semuanya,
>   
>   
>      Dalam melakukan tuning SQL ada yang saya ingin tanyakan mana yang lebih 
> cepat antara SQL1 dan SQL2? dan alasannya kenapa ya?
>   
>  SQL1 = select a.no,b.kdbarang
>                from  faktur a,faktur_d b
>               where a.no=b.no
>                  and a.tglfaktur between '01-JAN-2006' and '31-JAN-2006'
>                  and a.kdpel between '001' and '010'
>                
>  SQL2 = select a.no,b.kdbarang
>                from  faktur a,faktur_d b
>               where tglfaktur between '01-JAN-2006' and '31-JAN-2006'
>                  and a.kdpel between '001' and '010'
>                  and a.no=b.no            
>   
>  NB : Untuk semua field yang difilter telah diberi index.
>  
>
- kedua query diatas harusnya sama secara CBO
- bagaimana ukuran table faktur dan faktur_d ? kalau sizenya jauh 
berbeda.. sebaiknya indexnya dipaksa makai yang table besar..yang table 
kecil dibiarkan full scan..
- sebaiknya di test kedua query diatas, dilihat timenya.. execute plan 
itu hanya perkiraan..(walau kemungkinan besar akurat )

Thanks,

-- 
     - chiank -
  
  If You can dream it, You can reach it




--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
Mirror: http://indooracle.wordpress.com
-----------------------------------------------

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

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indo-oracle/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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