Hi Guys!

Can anybody tell why this query is taking SEVENTEEN SECONDS to run? I'm
looping through a bunch of form variables, and this query is taking 12 to 14
seconds every time (but this first time) to run. I'm running SQL Server and
CF Server off my laptop, but it didn't started running this slow until
lately. Updating to SQL Server SP2 had no effect.

UpdateTimeEntry (Records=1, Time=17095ms)
SQL =
-- ID: /_PM/includes/get_approver_field.cfm, v1.1.0 4/6/2001 4:45:10 PM
dbabbitt (71726827)
                        SET NOCOUNT ON

                        -- Set it up so that you can see if the update actually 
occurred
                        DECLARE @rowcount INT
                        DECLARE @Audit_ID INT

                        -- Attempt to set the clockin
                        UPDATE Time_Actual SET
                                -- Payroll approves all
                                Approved_House_Manager = 1,
                                Approved_Human_Resources = 1,
                                Approved_Payroll = 1
                        WHERE Time_Actual_ID = 34552
                        SET @rowcount = @@ROWCOUNT

                        -- Assume our audit table has a new record in it if we return 
a row count
                        IF @rowcount > 0
                        BEGIN
                                SELECT @Audit_ID = MAX(IDENTITYCOL) FROM 
Time_Actual_Audit
                                UPDATE Time_Actual_Audit
                                -- The user here is the approver
                                SET Users_ID = 1427
                                WHERE (Time_Actual_Audit_ID = @Audit_ID)
                        END

                        SET NOCOUNT OFF


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to