Pars
Pars

Reputation: 5262

Query speed while reading or writing

I know we can index our columns in tables, defining primary keys, partitioning to access faster to data.

But is there any different in reading from a table which has 10 columns and a table with 100 columns?
could someone explain how database reading could be faster?

Upvotes: 0

Views: 134

Answers (1)

NoChance
NoChance

Reputation: 5752

Reading data involves: possible index access, row location in storage, physical io between disk, buffer, as well as performing formatting operations and functions on the fetched data. IO speed is data size dependent (among other factors such as block size, disk speed, buffer size, etc.)

The more data you request, the slower the process is in general. if you have a row with 2 integers, it will be faster to read 1000 such rows that reading the same number of rows from a table with 2 Varchar2(500) rows (filled with data). Also reading 1000 rows with 2 columns is faster than reading a row with 100 column.

If you give more details you may get a more specific answer.

Upvotes: 1

Related Questions