As the number of rows in the result set increased, the number of columns will cause greater degradation on performance, especially for nested loops in your application which process rows in the outer loop, and columns in the inner loop. Sometimes the excessive number of columns is intentional and other times it is unintentional.
A sign of unintentionally excessive columns would be the SQL
syntax Select * From
. Consider modifying this syntax to
Select fieldList From
, where fieldList
is
the comma-separated list of all, and only, those fields your
application will actually need. The performance of the SQL syntax
using asterisk will be automatically degraded any time your database
administrator modifies the database design by adding columns.
A sign of intentionally excessive columns is simply a long list of columns in your SQL Select statement. Consider analyzing your actual needs to make certain all columns are necessary. It may be possible to request certain columns (needed only in exceptional circumstances) in a separate SQL operation. Please keep in mind if the Visible property of a column is set to zero (the control is not visible), even though the Column cannot be seen, it is still impacting performance.