[thelist] tuning MySQL

Matt McKeon matt at camadro.com
Thu Nov 30 11:02:31 CST 2006


Pedro Arana wrote:
> On 11/28/06, Matt McKeon <matt at camadro.com> wrote:
>   
>> Hershel Robinson wrote:
>> Right sorry, forgot the details in my cloud of confusion.
>> MySQL v.4.1.21
>> PHP v.4.4.4
>>
>> The two tables I'm working with are both less then 1MB, the DB size is
>> only about 5MB. This PHP script/MySQL DB was working seemingly fine in
>> our previous setup..
>>
>> The SQL being used is:
>> SELECT tbl_one.id, tbl_one.rating_current, tbl_one.rating_count,
>> tbl_two.name_internal
>> FROM tbl_one, tbl_two
>> WHERE tbl_one.id = tbl_two.id AND tbl_two.name_internal = $name
>>
>> UPDATE tbl_one
>> SET rating_current = $rate, rating_count = $cnt
>> WHERE id = $id
>>
>> Hope that makes it a little easier, o and its in a RHE 4 environment.
>>
>> -matt
>> --
>>     
>
> hi!
>
> Wich information shows desc?
>
> DESC SELECT tbl_one.id, tbl_one.rating_current, tbl_one.rating_count,
>  tbl_two.name_internal
>  FROM tbl_one, tbl_two
>  WHERE tbl_one.id = tbl_two.id AND tbl_two.name_internal = $name
>
>
>
>   
Sorry for the delay, we've been working on debugging this mess.. Anyway 
here's a DESC on the SELECT

id     select_type     table     type     possible_keys     key     
key_len     ref     rows     Extra
1     SIMPLE     tbl_one     ALL     PRIMARY     NULL     NULL     NULL 
    270      
1     SIMPLE     tbl_two     eq_ref     PRIMARY     PRIMARY     3     
db_daddy.tbl_one.id     1     Using where

thanks a bunch,
 matt




More information about the thelist mailing list