Results 1 to 4 of 4
  1. #1
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41

    Implementation Question

    I have a table for logging job details, and start/end times for the job. The data entry for the table is done via a continuous form. The table currently has over 100k records. I'd like to


    automatically update the end time for a job, when the employee starts a new job. I'd like to avoid having to query over 100k records each time to check if the employee has any jobs logged
    without an end time.

    Just looking for ideas on the best implementation for this.. First solution I can think of is just query the table for USERNAME where JOBENDTIME = NULL, and then insert the current
    time into the null field. But would this be efficient? Would the query search 100k records when trying to find the null endtime? The table is indexed on a unique job number field.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That's what I would do, an update query with those two criteria. You may want to add an index on the user field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41
    Thanks for replying. That is the solution I went with. I was just worried that an UPDATE command on a table with over 100k records would be inefficient. But it didn't seem to flinch. I might temporarily store the open jobs in a different table, and then commit them to the main jobs table after the end time/date has been entered for the job.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I personally wouldn't bother with the temporary table, unless you ran into performance issues. I doubt you will. With the 2 criteria, the database engine should handle it with ease.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-25-2012, 07:19 PM
  2. Replies: 4
    Last Post: 07-10-2012, 04:15 PM
  3. Implementation of DSN
    By seageath in forum Database Design
    Replies: 0
    Last Post: 02-28-2012, 09:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums