Physical Data Access Methods
If you've ever used a database before, you may have heard of something called an index.
You may have been told that they are used to somehow speed up the
database, but you've never really been sure how or why. Performance is
critical for any database system that's used by more than one person,
but particularly so for web database, which can have huge number of
simultaneous transactions. We need to be able to tune the database to
the types of operations most commonly performed by users. That's where
indexes come in.
" Database performance is determined at the physical storage level "
Indexes are just one part of a whole specialized area of
database management: physical data storage and access methods. Up till
now we've only talked about data in the logical sense, and pretty much
ignored how it is actually physically stored. Database preformance,
however, is determined at the physical storage level, so it's important
to look at how data is physically stored, and particularly how it can be
retrieved efficiently from disk. Note that because of physical data
independence, physical data storage mechanisms are (or should be)
totally independent of the logical data model used. In other words,
physical data storage is a level "below" things like the relational
model. The relational model in particular says nothing about physical
data storage.
The biggest bottleneck in any database system is how quickly we can retrieve data from disk (this includes both finding the data we want and actually reading it). Consider this: if a piece of data is stored in the main memory, the DBMS can usually retrieve it in a few nanoseconds. If the same piece of data is stored on disk, that time becomes a few milliseconds. We're talking thousands of seconds vs. billionths here, so in theory reading something from RAM can be up to a million times faster than reading it off disk.
No comments:
Post a Comment