www.webdeveloper.com
Results 1 to 2 of 2

Thread: Problem in displaying of data from select statement its consume lots of time

Threaded View

  1. #1
    Join Date
    Oct 2011
    Posts
    350

    Problem in displaying of data from select statement its consume lots of time

    Hi,

    I have query to get all the employees which has no in and out it means they are absent


    here is my code:
    Code:
     
    SELECT emp.employeeid, emp.lastname, emp.firstname, emp.middlename, emp.department 
         FROM employees AS emp
         LEFT OUTER
         JOIN attendance_log AS att
         ON att.emp_id = emp.employeeid
         AND DATE(att.log_time) = '2013-11-05'
         WHERE emp.sub LIKE '%REG%'
         AND emp.department IN ('Assembly', 'Fabrication', 'Compounding', 'Finishing', 'PET', 'Production', 'Squash', 'QA', 'ENGINEERING')
         AND att.emp_id IS NULL;
    this code works but the problem is too long to query. it consumes 5-15mins before display the data.


    I hope somebody can help me to change my query for faster displaying of data.


    Thank you
    Last edited by newphpcoder; 11-07-2013 at 12:47 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles