Database size and records are find. But your table scanning. Look at 
 
 
Handler_read_rnd_next 1018281500 

 
that indicates a table scan. This mean your not using your indexes effectivly 
or the tables are not set up with the proper indexes.
 
Perform show full processlist and or enable log-slow-query log-long-format
 
 
 

DVP

----

Dathan Vance Pattishall     http://www.friendster.com

 

 



________________________________

        From: Āngelo M. Rigo [mailto:[EMAIL PROTECTED] 
        Sent: Thursday, January 27, 2005 11:23 AM
        To: Dathan Pattishall
        Subject: RE: Creating indexes
        
        
        Thank“s again for sharing your mysql experience !
         
        may you can point  me if my numbers are too high?
        best regards!!
          
          records     size
           TABLE1       225,893  InnoDB      54.6 MB  
           TABLE2       611   MyISAM      122.3 KB  
           TABLE3       497   MyISAM      19.7 KB  
           TABLE4       49,930  InnoDB      8.0 MB  
           TABLE5       431   InnoDB      80.0 KB  
           TABLE6       139,933  InnoDB      43.7 MB  
          6 tables   Sum  417,295      106.5 MB  
         
        Variable_name  Value  
        Handler_commit 112 
        Handler_delete 2969004 
        Handler_read_first 71073 
        Handler_read_key 41714285 
        Handler_read_next 2199647292 
        Handler_read_prev 6942 
        Handler_read_rnd 915605 
        Handler_read_rnd_next 1018281500 
        Handler_rollback 639 
        Handler_update 31994410 
        Handler_write 281417564 
        
        Dathan Pattishall <[EMAIL PROTECTED]> wrote:

                no show full processlist to see which query or set of queries 
take the longest time.
                 

                DVP

                ----

                Dathan Vance Pattishall     http://www.friendster.com

                 

                 


________________________________

                        From: Āngelo M. Rigo [mailto:[EMAIL PROTECTED] 
                        Sent: Thursday, January 27, 2005 11:14 AM
                        To: Dathan Pattishall
                        Subject: RE: Creating indexes
                        
                        
                        using the show status variables can i discover wich 
collumn or query is consuming resources and opening too many connections ?
                        
                        Dathan Pattishall <[EMAIL PROTECTED]> wrote: 

                                
                                

                                Perform show status.
                                
                                Show status has a few variables to take a 
global look at your mysql server and how keys are being used.
                                
                                
                                 show status like 'Hand%';    
                                +-----------------------+----------+
                                | Variable_name         | Value    |
                                +-----------------------+----------+
                                | Handler_commit        | 0        |
                                | Handler_delete        | 0        |
                                | Handler_discover      | 0        |
                                | Handler_read_first    | 1        |
                                | Handler_read_key      | 27287397 |
                                | Handler_read_next     | 12891664 |
                                | Handler_read_prev      | 0        |
                                | Handler_read_rnd      | 347638   |
                                | Handler_read_rnd_next | 1031461  |
                                | Handler_rollback      | 3        |
                                | Handler_update        | 7360212  |
                                | Handler_write         | 1591558  |
                                +-----------------------+----------+
                                
                                
                                Take special note to Handler_read_rnd_next. If 
it's high your doing a table scan.
                                
                                Look online for the rest of these vars, they 
are very helpful. I personally graph them over time to make sure things are 
good.
                                

                                

                                
                                
                                
                                
                                DVP
                                ----
                                Dathan Vance Pattishall     
http://www.friendster.com <http://www.friendster.com/> 
                                
                                
                                
                                > -----Original Message-----
                                > From: Āngelo M. Rigo [mailto:[EMAIL PROTECTED]
                                > Sent: Thursday, January 27, 2005 10:04 AM
                                > To: mysql@lists.mysql.com
                                > Subject: Creating indexes
                                >
                                > Hi
                                > 
                                > I have an aplication wich is opening to many 
connections even
                                > i am using persistent connectins and closing 
every connection
                                > i do open
                                > 
                                > I have created indexes in all the fields i 
supose they are needed
                                > 
                                > I would like to know if i can and how can i 
measure where
                                > indexes are needed or where they can open too 
many internal
                                > connections since my aplication does many 
searches through
                                > the database..
                                > 
                                > Thank“s in advance
                                > 
                                >
                                > 
__________________________________________________
                                > Converse com seus amigos em tempo real com o 
Yahoo! Messenger
                                > http://br.download.yahoo.com/messenger/
                                > 

                        __________________________________________________
                        Converse com seus amigos em tempo real com o Yahoo! 
Messenger 
                        http://br.download.yahoo.com/messenger/ 

        __________________________________________________
        Converse com seus amigos em tempo real com o Yahoo! Messenger 
        http://br.download.yahoo.com/messenger/ 

Reply via email to