SQL INSERT performance omitting field names?

后端 未结 3 1692
南方客
南方客 2021-02-20 05:13

Does anyone knows if removing the field names from an INSERT query results in some performance improvements?

I mean is this:

INSERT INTO table1 VALUES (v         


        
3条回答
  •  后悔当初
    2021-02-20 06:02

    I don't know of any performance improvement by omitting the field names but I would advise against it for anything other than testing/once-only inserts.

    Readability will suffer (you have to check the table to see what is being inserted where) and your code will break if the table schema is changed

提交回复
热议问题