Does the number of columns affect query performance?

前端 未结 6 723
春和景丽
春和景丽 2021-01-03 21:23

CASE 1: I have a table with 30 columns and I query using 4 columns in the where clause.

CASE 2: I have a table with 6 columns and I query using 4 columns in the whe

6条回答
  •  长情又很酷
    2021-01-03 21:36

    There will be no performance difference based on the column position. Now the construction of the table is a different story e.g. number of rows, indexes, number of columns etc.

    The scenario you are talking about where you are comparing the position of the column in the two tables is like comparing apples to oranges almost, because there are so many different variables besides the column position.

提交回复
热议问题