2006/4/22, abhishek jain <[EMAIL PROTECTED]>: > Dear Friends, > I have two table joined by the followng query, the problem is this simple > query takes a lot of time greater than 10 mins depending on the number of > records, Pl. help me find out the reason: > Table 1: > id_key primary and auto increment > recordID varchar(100) > login_name varchar(255) > blah > blah > > > Table 2: > id_key primary and auto increment > recordID varchar(100) > blah > blah > > > Query: > SELECT count( * ) FROM table1 s, table2 c WHERE s.login_name = 'abhishek' > and s.recordID=c.recordID; >
alter table s add index(login_name); alter table c add index(recordID); Do you it recordID to be a varchar ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]