Oracle Range Partitioning Algorithm – Where to Find It

database-internalsoraclepartitioning

I am new to database and would like to know where can I find the resource to study and understand about different algorithms used in table partitioning

For example, what algorithm is used between range and hash partition to find the partition that a data to be inserted.

Best Answer

Manuals:

Books:

  • Expert Oracle Database Architecture,
    by Kyte, Thomas, Kuhn, Darl
    contains about 70 pages about partitioning. I did not know it but I assume it contains a very detailed presentation of the topic.

Whitepapers:


  • Oracle uses a data dictionary to store the structure of the database objects. These data dictionary contains a set of tables that are located in the SYS schema and have a name that ends with '$'. The table SYS.TABPART$ contains a row for each partition. So if before Oracle stores a row in a partitioned table it hast to read SYS.TABPART$ table of the data dictionary to get information about the partitioned table. Oracle is implemented in C, so access to partitiones is implemented in C-code, too. This C-code is proprietary to Oracle and not made publicly available. The data structures that are used in these programs aren't publicly available too and I think Oracle has no interest to make it known to the public. But it is not necessary to know such details if you want to work with Oracle or want to get a deep understanding of how Oracle works.

  • The partition relevant dictionary objects are created by the $ORACLE_HOME/rdbms/admin/dpart.bsq' script. There are a lot of other bsq-scripts in this directory that create other dictionary objects. These scripts are executed when the database is created. They are referenced by the well known USER_ / ALL_ / DBA_ views that are a more user friendly access to the dictionary data.

  • You cannot access the Oracle C-code but if your are interested in how a real database is implemented you can study the source code of an open source database. As far as I know MariaDB (a MySQL successor) is an open source database that has implemented partitioning. Also there are a lot of books about database systems and data structures.