I think the answer is "No, a call to GRAPHICAL_PLAN() will at most execute the query portion of an UPDATE statement but it won't actually update any rows or execute any triggers."

The following SQL produced the attached plan for a single-row UPDATE that takes 30 seconds to execute; the attached plan shows the UPDATE as taking less than 1 second to run:

      CALL xp_write_file ( 
         STRING ( 'C:/TEMP/plan_for_update_', @sampling_id, '_', @sample_set_number, '.saplan' ),
         GRAPHICAL_PLAN (
            'UPDATE rroad_sample_set
                SET rroad_sample_set.sample_finished_at = @foxhound_probably_stopped_at
              WHERE rroad_sample_set.sample_set_number = @sample_set_number',
            2, -- Detailed statistics including node statistics
            'asensitive',
            'READ-ONLY' ) );

asked 01 Dec '12, 16:55

Breck%20Carter's gravatar image

Breck Carter
26.9k437609883
accept rate: 21%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×245

question asked: 01 Dec '12, 16:55

question was seen: 349 times

last updated: 01 Dec '12, 16:55