문제

Do we experience a noticeable difference in performance for these two queries?

INSERT INTO table (col1, col2, col3, col4, col5) ...

and

INSERT INTO table (col5, col3, col1, col2, col4) ...

Do we need to arrange INSERT columns according to the order of columns in the table?

도움이 되었습니까?

해결책

No, you don't need to gave the columns in the same order. Not least, table order may not reflect actual on-disk order (this is 100% true for SQL Server, and I'm sure MySQL is the same)

Unless your OCD itch needs scratched

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top