By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

How to improve the performance of mysql query

P: 2
I can not able to see the following query result. start running before 10 hrs. I try to fix the problem by adding index for both tables I used and also I enabled mysql query catch. For your information

I used mac os X, processor 2.66 GHz intel core I7, 4 GB memory 1067 MHz DDRS. and mysql version : 5.5.14;

number of records in fileinfo : 495,557 and fileConnection: 6,298,732.

create table SelectedFileLinksChilds as select sp.*,fl.file_id as parent_file_id,fl.commit_id as parent_commit_Id ,fl.parent_id as p_Parent_id FROM fileInfo sp left join fileConnection fl on sp.file_id = fl.parent_id ;

would you please help me on this matter.

Thank you in advance
Oct 2 '11 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,366
That's a pretty simple query so there's not much room for improvement except to put an index on your join is there isn't one already.
Oct 3 '11 #2

P: 2
Thanks Rabbit, I fixed by adding primary key for the second table,fileConnection and by change my index field from 'file_id' to 'parent_id'.
Oct 3 '11 #3

Expert Mod 10K+
P: 12,366
Good luck. With that amount of records, you're going to be limited more by the power of your hardware rather than the SQL.
Oct 3 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.