-1

For example I have 15 table where each table has a common column named Comment(512) and if I remove Comment(512) column with there be any performance variation[Inc or dec]?

  • 3
    Possible duplicate of [Does the number of columns returned affect the speed of a query?](http://stackoverflow.com/questions/852572/does-the-number-of-columns-returned-affect-the-speed-of-a-query) – ahmed abdelqader Mar 06 '17 at 10:19
  • i think,if you are not using Comment(512) in any part of your query then it won't affect. – KumarHarsh Mar 06 '17 at 10:41
  • The number of columns returned in a select statement definitely impacts performance. Number of columns in the table itself has no impact. Implication: Do not use select * – NotCaring Mar 06 '17 at 11:27

1 Answers1

0

The number of columns and data type of course affects the rows size, and how much data fits into the 8k page. If the column is variable length, like varchar, then also the contents of the column affects.

The more rows you can fit into a page affects the whole size of the table, and also how much will be read into memory with one I/O, and how much cache (buffer pool) is needed for your queries.

If the field is in clustered index, then it also affects more, because that field is included in all the other indexes.

If the table is small, or the other columns are large too, then of course the affect is smaller.

James Z
  • 12,209
  • 10
  • 24
  • 44