From: Martin Gainty Date: August 14 2008 12:39pm Subject: RE: SELECT in NULL state for a long time List-Archive: http://lists.mysql.com/mysql/214105 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_11940f27-706d-4d85-9caf-74400a150859_" --_11940f27-706d-4d85-9caf-74400a150859_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable If you want MYSQL to process the SELECT=2C including information about how = tables are joined and in which order usehttp://dev.mysql.com/doc/refman/5.0= /en/using-explain.htmle.g. EXPLAIN [EXTENDED] SELECT select_optionsIf you w= ant MySQL uses the stored key distribution to decide the order in which tab= les should be joined when you perform a join on something other than a cons= tant. In addition=2C key distributions can be used when deciding which inde= xes to use for a specific table within a query. http://dev.mysql.com/doc/re= fman/5.0/en/analyze-table.htmlYou can also check your stored key distributi= onhttp://dev.mysql.com/doc/refman/5.0/en/show-index.htmlMartin ____________= __________________________________ Disclaimer and confidentiality note Ever= ything in this e-mail and any attachments relates to the official business = of Sender. This transmission is of a confidential nature and Sender does no= t endorse distribution to any party other than intended recipient. Sender d= oes not necessarily endorse content contained within this transmission. > D= ate: Thu=2C 14 Aug 2008 17:35:00 +0530> From: prajapatikc@stripped> To: vl= ad@stripped> Subject: Re: SELECT in NULL state for a long time> CC: mysql@lis= ts.mysql.com> > Record the query=2C execute and see the result. Make sure t= hat you get the> result. To me its seems that lots of request are comming a= nd not full> filled. Check the query for optimization.> > On Thu=2C Aug 14= =2C 2008 at 5:17 PM=2C Vlad Shalnev wrote:> > > Hi=2C> >> > O= S - Solaris 10=2C 32 Gb RAM=2C mysql 64-bit 4.1.22> >> > Every day I see in= processlist many SELECT queries that stay in NULL state> > for a long time= . Something Like this> >> > | 368966 | radius | fire-u1:35671 | srg_conf | = Query | 106 |> > NULL |SELECT id=2C deleted_id=2C status=2C name=2C LEFT( v= alue=2C 1000 )> > FROM s> >> > | 368967 | radius | fire-u1-1:35672 | srg_co= nf | Query | 105 |> > NULL |SELECT id=2C deleted_id=2C status=2C name=2C LE= FT( value=2C 1000 )> > FROM s> >> > | 368968 | radius | fire-u1-1:35673 | s= rg_conf | Query | 101 |> > NULL |SELECT id=2C deleted_id=2C status=2C name= =2C LEFT( value=2C 1000 )> > FROM s> >> > | 368969 | radius | fire-u1:35674= | srg_conf | Query | 101 |> > NULL |SELECT id=2C deleted_id=2C status=2C n= ame=2C LEFT( value=2C 1000 )> > FROM s> >> > | 368970 | radius | fire-u1:35= 675 | srg_conf | Query | 100 |> > NULL |SELECT id=2C deleted_id=2C status= =2C name=2C LEFT( value=2C 1000 )> > FROM s> >> > | 28 | mysql | fire-u1:58= 138 | hnt_cn | Query | 116 |> > NULL |SELECT id=2C deleted_id=2C status=2C = name=2C LEFT( value=2C 1000 )> > FROM h> >> > | 48 | radius | fire-u1:58166= | hnt_cn | Query | 114 |> > NULL |SELECT id=2C deleted_id=2C status=2C nam= e=2C LEFT( value=2C 1000 )> > FROM h> >> > | 49 | radius | fire-u1-1:58165 = | srg_cn | Query | 127 |> > NULL |SELECT id=2C deleted_id=2C status=2C name= =2C LEFT( value=2C 1000 )> > FROM s> >> > | 50 | mysql | fire-u1-1:58163 | = blr_cn | Query | 120 |> > NULL |SELECT id=2C deleted_id=2C status=2C name= =2C LEFT( value=2C 1000 )> > FROM b> >> > Connections grow up during this t= ime and after a couple minutes this> > problem gonna away.> >> > Explain me= please why it happens and how can I solve this problem> >> > Thanks> >> > = --> >> > ------------------------------------------------------------------= --------------> > Vlad A. Shalnev> > E-mail: vlad@stripped> >> > "Gravity can= 't be blamed> > for someone> > falling in love"> >> > ( Albert Einstein )> = >> > --> > MySQL General Mailing List> > For list archives: http://lists.my= sql.com/mysql> > To unsubscribe:> > http://lists.mysql.com/mysql?unsub=3Dpr= ajapatikc@stripped> >> >> > > -- > Krishna Chandra Prajapati _________________________________________________________________ Get more from your digital life. Find out how. http://www.windowslive.com/default.html?ocid=3DTXT_TAGLM_WL_Home2_082008= --_11940f27-706d-4d85-9caf-74400a150859_--