Hi
I have one sql query. using this query i can download 10 lakhs of data in csv file for 6 hours. now i want to download 20 lakhs of data for 6 hours or less. please tell me how to increase the performance.
SELECT id as imp_addr_id,userEmail, email ,name,mobile_no,gender,city,income,profession,experience,country,pincode,type FROM import_address_book_test WHERE blacklist!='1' AND email!='' AND ( email like'%@gmail.com' OR email like'%@yahoo.com' OR email like'%@suksh.com' OR email like'%@rediff.com' OR email like'%@rediffmail.com' OR email like'%@ymail.com' OR email like'%@zapak.com' OR email like'%@live.com' OR email like'%@msn.com' OR email like'%@hotmail.com' OR email like'%@yahoo.co.in' OR email like'%@yahoo.in' OR email like'%@in.com' OR email like'%@indiatimes.com' OR email like'%@live.in' OR email like'%@aol.in' OR email like'%@sify.com' OR email like'%@rocketmail.com' OR email like'%@live.in' OR email like'%@yahoomail.com' ) AND status=1 AND ( email NOT LIKE 'info@%' OR email NOT LIKE 'admin@%' OR email NOT LIKE'noreply@%' OR email NOT LIKE'sales@%' OR email NOT LIKE'no-reply@%' OR email NOT LIKE'mailer@%' OR email NOT LIKE'mailer-demon@%' OR email NOT LIKE'groups%@%' OR email NOT LIKE'noresponse@%' ) AND email NOT LIKE'%@%@%' AND cash_paid = '2' AND contest = '2' ORDER BY lastModified ASC