Is there any reason to use one of these UPDATE statements over the other in terms of performance?
UPDATE myTable SET fieldx = 1 FROM myTable AS mt , myView AS mv WHERE mt.id = mv.id UPDATE myTable SET fieldx = 1 WHERE id IN ( SELECT id FROM myView )
They will probably come out with the same execution plan, which means there is no difference. To confirm, just try each one in SSMS with the "Enable execution plan" option enabled.
In fact, I would like to:
UPDATE mt SET mt.fieldx = 1 FROM myTable mt JOIN myView mv ON mt.ID = mv.ID
I prefer this syntax. Although, he will also come out with the same execution plan.
, UPDATE. , - :alt text http://img707.imageshack.us/img707/7801/60422461.png
alt text http://img683.imageshack.us/img683/7874/41210682.png
alt text http://img708.imageshack.us/img708/5020/20506532.png
, , , . , :
UPDATE myTable SET fieldx = 1 --SELECT * FROM myTable AS mt , myView AS mv WHERE mt.id = mv.id
Source: https://habr.com/ru/post/1731913/More articles:Холст Tkinter не отображается - pythonВеб-служба Java через https - Как добавить самозаверяющий сертификат в клиентский api? - javaProperties of the operating system (2k8 R2 vs Win7) - windows-installerSorry, we are unable to access the page you requested:https://fooobar.com/questions/1731911/index.htmlphp setcookie crashes under php5 - phpКак реализовать метод символов с помощью SAXParser на Android - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1731915/jdbc-converting-dates-to-utc&usg=ALkJrhjyVkrSG9adZ_PJ45ib5Y1TvPEZGgCSS error rounded corners in Safari? - cssHow to create Firebird SP, get rows from some dynamic tables? - stored-proceduresHow to extract a signature from a function reference in Python? - pythonAll Articles
https://fooobar.com/questions/1731911/index.html