On Wed, Oct 7, 2009 at 9:00 AM, Ali İhsan Türkoğlu <[email protected]> wrote: > I am new on MySql. > > I run the below query in MySql Query Browse. Althought I wait more than 10 > minutes, not reached the result. > > Please help what is wrong with my guery. > > > > select k.*, b.sgk_statu > > from kabul_cikis k, basvuru b > > where k.basvuru_fk = b.id > > and k.sosguvsnf = 1 > > and k.iptal < 1 > > and b.id between 1 and 50655 > > and b.id in( select basvuru_fk from kabul_cikis where iptal < 1 group by > basvuru_fk having MIN(cikis_zmn)> ' ') > > and k.devrkurum <> '4'; --------------------------------------
You will need a compound index kabul_cikis basvuru_fk and devrkurum and iptal and cikis_zmn How many rows are in kabul_cikis? You are probably getting hit hard here MIN(cikis_zmn)> ' ' HTH -- Stephen Russell Sr. Production Systems Programmer SQL Server DBA Web and Winform Development Independent Contractor Memphis TN 901.246-0159 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

