SQLite currently implements UPDATE by pretending it is SELECTing all the fields, except a SET clause causes the expression(s) to be evaluated instead of the current field value(s).
Are you using a single prepared statement and binding values (in which case, how do you know what values to bind for the "non-updated" columns?) or are you creating query strings? -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von ghalwasi Gesendet: Mittwoch, 06. September 2017 17:57 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] [sqlite] Performance impact of UPDATEing multiple columns vs few columns I am using SQLite C library in my application and I have a question regarding updating "mutiple" columns using UPDATE statement. Lets suppose, my Database table has 10 columns (c1, c2 ... c10). My question is that what will be the difference (in context of CPU cycles & performance) if i UPDATE multiple columns or only few columns. Lets say if the requirement is to just update c2 & c3 but if we are updating c2, c3,c4,c5,c6,c7 UPDATE db SET c2,c3,c4,c5,c6,c7 WHERE c1=x (c1 is a primary key) or UPDATE db SET c2,c3 WHERE c1=x (c1 is a primary key) -- Sent from: http://sqlite.1065341.n5.nabble.com/ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users