home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 479 of 2,288   
   Jim Kennedy to mingx_98@yahoo.com   
   Re: How to improve a simple SQL performa   
   02 Oct 03 14:33:13   
   
   From: kennedy-down_with_spammers@no_spam.comcast.net   
      
   "ALex_1998"  wrote in message   
   news:4b149eee.0310020624.5d6cb921@posting.google.com...   
   > Hi Dear All,   
   >   
   > I have a large query as below:   
   >   
   >   
   > select count (distinct b.bus_acct_id) from   
   >      M_DATE M1,   
   >    M_BIZ_ACCT M2,   
   >    BIZ_ACCT B,   
   >    C_PRDT_PKG C   
   >  where   
   >  M1.month_id = M2.month_id   
   > and    M2.CDS_PROD_PKG_ID = c.CDS_PROD_PKG_ID   
   > and M2.Bus_Acct_Id = B.Bus_Acct_Id   
   >   
   > There are 4 tables , M_DATE , has 100 rows, M1 stands for  it,   
   >                      M_BIZ_ACCT, Has 2.5 Million rows, M2 stands for it,   
   >                      BIZ_ACCT, Has 1 Million rows, B stands for it,   
   >                      C_PRDT_PKG , has 20 rows, C atands for it.   
   >   
   >  This SQL take about 10-15 minutes, it is Oracle 8.1.7.4.0,   
   >   
   >  Is there anyway to improve performance  by change   
   > the SQL I used, such as change order of tables list,   
   >   
   > because 2 of the them are small, the other 2 are very large,   
   >   
   >   
   > Thanks   
      
   What is the explain plan, what is the tkprof output , are the tables   
   analyzed, what indexes do you have?   
   Jim   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca