Re: mysql using big two tables in BSD

2004-04-23 Thread kamlesh pandey
Hi Ken, I added the index as per your suggestion ,but looks like mysql is not using that index(user_id,user_data2). Here is my actual explain output for real tables. NOTE For alert_type_list :type_id_idx is index on alr_type,id id_type_idx is index on id,alr_type id_idx is index on id id on n

Re: mysql using big two tables in BSD

2004-04-22 Thread Ken Menzel
Hi Kamlesh, You should send an explain of the query, but if there is no index on tableB.user_id your join will not work well, since the actual join would be on tableB.user_id=tableA.user_id Either change your index on table b to be user_id,user_data2 or add this index. Hope this helps, Ken Ke

RE: mysql using big two tables in BSD

2004-04-21 Thread Dathan Vance Pattishall
Use explain [INSERT YOUR SELECT STATEMENT] Verify your using keys and if you are using keys ensure that the join say eq_ref and the first key is const. If this is the case then this is the fastest possible join you can do for the statement below. -- DVP > -Original Message- > From: kamle