|
The indexes do not know of the total number of columns in a table. So
all things being equal except for the number of columns in a table,
using an index will be the same for both tables. However, more columns
can lead to longer row lengths requiring more blocks of data to store
the same number of rows. So retrieving more blocks of data can take
longer.
If you query just the attributes in the index, then Oracle will never
read the table's contents since it has everything it needs in the
index. This means that the total number of columns in the table will
not affect the query performance in this example.
That being said, there are many factors that can impact query
performance. So your mileage may vary. The above are rules of thumb and
there are exceptions to those rules which may give you different
results.
|