mysql - How to Optimize the below query -
select c.std_date,c.conf_link,c.conf_link link,c.conf_id,c.url_id,c.entry_source,c.data_source,c.title,c.conf_domain, c.descrip, c.std_loc, c.std_practices,c.region, co.company_id,co.company,co.home_url conferences c, companies co c.org_id= co.company_id , c.org_id in (12,47,173,120,102,83,95,172,200,78,199,523,134,123,30,185,103,202, 159,133,178,49,161,146,17,212,136,43,107,147,142,3, 205,171,177,443,175,74,156,41,42,128,5,7,62,37,195,68,89,8,39,85,126,36,24,206,208,201,150,152,168,59,97,28,11,116,140,98,117,51,174,93,192,50,617,176,101,194,527,61,179,170,145,40,92,257,149,48,88,486,20,111,106,203,19,31,163,81,25,38,623,628,642,643,644,645,647,677,711,712,713,6173,6174,6176,6177,6184,6185,6186,6189,6191,6207,6210,6211,6212,6214,6215,6217,6218,6219,6222,6223,6224,6294,6297,6298,6300,6301,6302,7468,7469,7471,7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7489,7490,7491,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,7522,7523,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557,7558,7559,7560,7562,7566) , conf_id !='' , (region !='123' , region not 'webinar%') , std_date >= '2013-04-17' , std_date <= '2013-04-24' , (data_source 'e%' or data_source 'a%') , region != '' , org !='' , title not '%groupcast%' , relevance >= 0 order std_date desc limit 3500
this should need. wouldn't have type id
s manually
where c.org_id= co.company_id , c.org_id in (select id conferences)
Comments
Post a Comment