select * from note_01_info as n ,NOTE_RECEIVER_15_INFO as r where n.note_id = r.note_id and ( (r.receiver_id = '137415' ) or (r.SEND_ID in ('1279418','2311118','2254924','160801','164710','2267727','2275320','1252806','2279407','2284007','1272008','2272908','2295408','2261409','1277809','2276610','1282609','1289010','2290110','2241820','1293210','2281808','1183520','2192201','1254116','2243116','181015','2262506','166703','224512','1237605','153606','2221627','141928','2251918','1200402','2203902','1242101','2218903','1221605','1217303','2268927','1214103','1278116','151618','202515','154207','1264006','1243704','2250701','2243404','1226003','1257705','158604','164128','1241126','2263205','191116','142608','160304','1198502','2233327','139804','175708','1268515','2229720','1243109','2176931','157613','145715','2216420','173907','1282324','2216429','1213529','209614','2238810','2200030','143124','140402','1268720','174218','130424','1264005','1203302','2234228','2268423','2231706','1196720','161712','1236406','2210830','1247104','1250904','1265704','2240005','1255802','1256402','1216103','2230603','1241103','2250804','2250704','2229905','2233405','2241005','1241705','1242105','1244705','2220522','1250215','1202803','1274327','150430','158903','1222001','2226101','2228801','2241401','1209202','1225802','1233202','135212','1239526','2226021','2257318','135723','141921','2228919','1211808','1269813','2222105','1172631','155619','1266719','149908','1235112','1218109','2277313','2207303','2201719','2268514','2217317','2247818','2263913','1239720','1265620','2252118','1240517','2204228','1226722','157612','2253218','1276723','2224630','160424','131131','214925','174828','1235419','2221027','2196703','170413','179213','181413','192413','203215','202715','210615','216715','221715','222815','208916','202316','195116','2191117','2204918','2201618','2189920','2217720','2216820','1184621','1195721','2173122','2173922','1181022','2197522','1197622','2198122','1199522','1196623','1202423','2217323','1223123','2236423','2237223','2222724','2237725','1214326','1214826','1224427','2230227','2235127','1235927','2236927','1213628','1217528','2175831','1181031','2182031','2200201','1203201','2212201','2186102','1187302','1190302','1191202','1194103','2197803','1208503','2209103','2212604','2221504','2224204','2226604','2208405','1210605','2213206','1210806','2219306','1220406','1222506','1224506','1238707','1212208','1215408','2219208','2235808','1244908','1214609','1238209','1226910','2232510','2240210','1252410','1242511','2242811','1242711','2242911','1246311','2257211','2259411','1261511','2241012','1243312','1251312','2251712','1254412','1257712','1263312','1220013','1260716','2281316','1284516','1294916','2210517','1263925','2239126','2245426','1244427','2213530','1240429','220112','210216','1207908','164727','2256327','2265724','2235529','183818','1246210','2229926','1248210','2236310','1263020','2255012','1210317','1246514','2261715','1250617','181602','1173722','2182222','188608','200126','2214529','217911','167909','2185531','1225705','1184922','195616','1265323','228215','201527','193407','1196321','220912','192411','194713','172723','214314','102708','2238718','162229','1245318','2255213','1257011','2220404','1242322','2259527','2258327','102912','106126','101426','133318','137706','144719','109225','2231210','2233810','1240112','2239313','1253617','2227218','2217521','2234722','2242022','2252826','1254726','1238627','2256927','1249827','1255215','1231918','1245115','2262320','2210422','2211922','1211122','1213522','2221322','1226922','1235822','1239222','2246323','2248323','2255623','1266123','2268823','2269823','1272123','1274223','2265324','1211805','140329','138214','168901','2249319','1241812','1236124','1260412','1232908','1231226','2220908','2235910','2240212','1209922','2230126','2244716','170727','200405','212115','102819','194424','2177331','1206321','2192021','1208205','210611','178207','180606','166216','2217009','157716','155822','1239017','2261307','2256407','1249007','1253107','1251907','1217905','1245107','1243707','1239807','1237807','2235407','2232707','2229207','2246106','1238406','2236806','2224306','1221206','2220006','2215306','2225510','1221810','2240809','1232009','1214009','1232109','2231709','1217209','1209509','2247308','1208509','1236108','2240408','1235008','1232808','2229108','1226608','1213908','1232712','1228412','2262911','2258811','2252711','1252211','1248211','1250310','1246411','2220510','1239411','2230711','2258610','2255010','1251910','2246310','151524','2237710','1226710','1233912','139701','1240512','1247912','1251912','2255312','2264312','1206913','1268112','2220713','2222413','2223213','1226813','2256712','165119','2235213','2236713','2238313','2240213','2243613','1243313','2244613','2246013','2251913','2254313','2262013','2258913','1278313','1281113','1245114','2246414','1257914','2258614','2263414','1263514','2263914','1266914','202528','136501','153416','168222','157729','2191902','2188020','1225519','131724','160216','142223','102826','161926','156926','163013','137730','143724','160918','167021','161429','204526','190925','157527','154703','142711','129022','204325','151225','188414','180424','165118','157631','167524','172105','129422','167114','159620','173830','144023','131924','154727','182115','191501','189125','188226','161503','172202','171527','141330','152810','175518','167005','188914','162502','147925','173118','148624','132721','186701','204606','147829','128115','100425','170507','140412','168609','100125','160815','153314','187001','178211','175211','175610','180902','195508','151019','168512','157204','186913','146923','1189922','1191517','208024','164303','2172131','181829','228315','1227725','205115','2211904','195908','1257307','1214704','163810','1250608','1245311','2247311','1223110','2232112','1225612','1251612','1219809','138302','100810','203627','202226','141022','130003','131122','160314','150521','161409','141823','157711','148615','149624','144524','200824','129315','167231','135105','195028','182928','177116','144313','161212','187614','177815','174004','204127','191629','215010','127302','205016','190013','221016','163307','1243207','1209806','145909','1218409','154607','1222323','201212','2216326','208225','185328','137118','182526','2183220','1227116','153817','156914','144527','134727','190708','191708','193608','202908','201108','2195218','185514','189914','165915','167515','170615','170515','175815','173215','180015','181615','188616','188216','178016','174816','194815','196915','194426','192626','219225','220325','216425','146225','141508','201725','199825','204405','185906','205405','195006','198906','200906','198307','203707','222507','178308','187008','213414','166917','228015','2206318','2199019','1184521','180118','223316','231015','203609','101104','189123','198509','204509','191109','186509','189708','197108','203308','203508','204208','2201730','2193730','2216129','2213629','1234327','1199929','2219028','1227227','2230626','2178631','2192401','2196101','1197301','1199801','1208701','152814','146120','182503','161402','2213401','1219127','101012','167821','221612','2205101','214724','151719','189929','142510','205815','100626','166729','179312','207416','2204423','2210720','1231525','226111','147204','2191321','2198021','148111','1170717','196214','2216519','156422','132022','159417','141803','165631','1221620','2214223','2181521','149722','161411','142302','2226624','161502','197829','202507','2199421','223615','1222328','1236327','1222020','1195519','137321','136619','2236623','143205','1225026','222215','158505','2229924','2229324','2212219','2205318','129622','2200119','1183321','145728','142127','2225824','186930','163310','144316','1225424','195706','138506','133816','102606','100430','211714','203425','211315','176604','100621','155608','165906','135428','166515','2178017','128922','170322','208714','170412','135607','145106','204915','175604','173704','174325','166104','143414','141103','142724','178727','172923','186507','100130','160806','182419','184614','186118','183018','189316','182718','182315','176115','180414','213826','179816','188418','147104','163331','101130','192726','100627','166311','193925','170611','147728','189623','145316','170410','201205','197226','181708','183308','196410','206310','165107','178011','183513','190518','210310','206615','172227','149402','171625','151712','142013','175529','165003','147113','148530','170607','169627','169911','195310','203525','172519','160721','140629','143013','150322','190616','147209','127405','163130','181503','132212','100625','184205','168924','203205','203908','180819','173623','200807','170105','201409','176411','147005','188314','139619','145219','143512','183815','183415','135707','147303','184406','162717','166417','102321','140307','148719','167023','155429','136011','147408','134826','100119','187906','159509','182801','135610','169818','197009','141018','158403','203125','155615','167917','167920','177920','195728','200304','201906','138220','147623','137811','184410','132924','140018','131611','147019','151714','148621','135024','154118','133122','1227025','1191420','101825','218415','152708','190623','1267127','187629','185926','2254006','2223413','1267306','2246304','200905','190109','1244215','100409','174126','183605','240914','1220428','152205','2247410','101925','1197021','2248917','190813','156917','156417','151518','103024','1201921','155114','105624','144325','204511','2218029','155918','1284018','102125','129431','102726','2217128','177726','145610','1254424','2235423','143702','1241017','154510','1210209','1266806','137415' ) and r.RECEIVER_TYPE = 6) ) order by n.PUBLISH_TIME desc LIMIT 0 , 21; +----+-------------+-------+-------------+-----------------------------------------------+---------------------------------+---------+--------------------+--------+-------------------------------------------------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------------+-----------------------------------------------+---------------------------------+---------+--------------------+--------+-------------------------------------------------------------------------------------------------+ | 1 | SIMPLE | r | index_merge | INDEX_NOTE_ID,INDEX_SEND_ID,INDEX_RECEIVER_ID | INDEX_RECEIVER_ID,INDEX_SEND_ID | 9,9 | NULL | 187044 | Using sort_union(INDEX_RECEIVER_ID,INDEX_SEND_ID); Using where; Using temporary; Using filesort | | 1 | SIMPLE | n | eq_ref | PRIMARY | PRIMARY | 8 | followme.r.NOTE_ID | 1 | | +----+-------------+-------+-------------+-----------------------------------------------+---------------------------------+---------+--------------------+--------+-------------------------------------------------------------------------------------------------+ 2 rows in set (0.08 sec)