Results 1 to 3 of 3
  1. #1
    Amber_1977's Avatar
    Amber_1977 is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    5

    Update Query Performance Issue

    Hello – The below update query takes over an hour to run so I need some help improving the performance.

    When I run the same query as a select, it only takes a few minutes to complete and I can easily use the record selector to move to the last record.

    I have already created an index on Sellable_Placeable_Starts.ACCESS_MEDIUM_NO and AGENCY_FINAL.cracct_no but the performance is still poor.

    Does anyone have any suggestions?

    Thank you!

    (Both tables are local)
    AGENCY_FINAL = 103,294 records
    SELLABLE_PLACEABLE_STARTS = 106,193 records.



    DoCmd.RunSQL "UPDATE Sellable_Placeable_Starts INNER JOIN AGENCY_FINAL ON Sellable_Placeable_Starts.ACCESS_MEDIUM_NO = AGENCY_FINAL.cracct_no SET Sellable_Placeable_Starts.MODEL_RANK2 = [Rank], Sellable_Placeable_Starts.MODEL_SCORE2 = [PayScore]"

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    where do [Rank] and [PayScore] come from? I will guess a value calculated or entered in a form?

    I would do this;

    put [Rank] and [PayScore] values in control boxes in a form if they are not already.

    make a plain old select query similar to your first part of that sql statement that has the purpose of just collecting the correct records into one record set. Name this qrySelectedRecords and save. make sure when you run this that the correct records appear.

    then make another query - use query design beginning as a select query; put qrySelectedRecords up as a table source, and drag down the columns to be updated into the query design - - then change the query to an update query; in the 'update to' field of each column put the form/control name that holds the rank & payscore info as appropriate for that column. the form must be open of course. i.e.
    Forms!FormName.ControlName

    run that update query. it should update pretty quick.

    hope this helps.

  3. #3
    Amber_1977's Avatar
    Amber_1977 is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    5

    NTC Thank you for your reply!

    I'm sorry for the confusion, [Rank] and [PayScore] are fields from the AGENCY_FINAL table.

    The query is still performing poorly, does anyone have an idea for how to improve it?


    The query should look like this:

    DoCmd.RunSQL "UPDATE Sellable_Placeable_Starts INNER JOIN AGENCY_FINAL ON Sellable_Placeable_Starts.ACCESS_MEDIUM_NO = AGENCY_FINAL.cracct_no SET Sellable_Placeable_Starts.MODEL_RANK2 = AGENCY_FINAL![Rank], Sellable_Placeable_Starts.MODEL_SCORE2 = AGENCY_FINAL![PayScore]"

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

Similar Threads

  1. db Performance Over Network
    By dbuck in forum Access
    Replies: 2
    Last Post: 09-20-2010, 09:58 AM
  2. slow performance with multiple users
    By netgrim in forum Access
    Replies: 4
    Last Post: 05-16-2010, 05:41 PM
  3. Poor performance in design mode after split
    By sprovoyeur in forum Access
    Replies: 1
    Last Post: 04-13-2010, 03:25 PM
  4. Performance Issues with Replica databases
    By accessgenie in forum Access
    Replies: 1
    Last Post: 12-05-2009, 10:03 AM
  5. connection performance
    By DanM in forum Programming
    Replies: 0
    Last Post: 08-24-2008, 08:25 AM

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