Character Strings-Datatypes

There are four basic character string types in Oracle, namely, CHAR, VARCHAR2, NCHAR, and NVARCHAR2. All of the strings are stored in the same format in Oracle. On the database block, they will have a leading length field of 1–3 bytes followed by the data; when they are NULL, they will be represented as a Read More

NLS Overview-Datatypes-2

Notice how in the 7-bit session I received the letter “a” three times with no diacritical marks. However, the DUMP function is showing me that in the database there are, in fact, three separate distinct characters, not just the letter “a.” The data in the database hasn’t changed—just the values this client received. If this Read More

Character and Binary String Types-Datatypes

The character datatypes in Oracle are CHAR, VARCHAR2, and their “N” variants. The CHAR and NCHAR can store up to 2000 bytes of text. The VARCHAR2 and NVARCHAR2 can store up to 4000 bytes of information. Note Starting with Oracle 12c, VARCHAR2, NVARCHAR2, and RAW datatypes can be configured to store up to 32,767 bytes Read More

An Overview of Oracle Datatypes-Datatypes-2

•\ TIMESTAMP WITH TIME ZONE: This is a fixed-width 13-byte date/ time datatype, but it also provides for TIME ZONE support. Additional information regarding the time zone is stored with the TIMESTAMP in the data, so the TIME ZONE originally inserted is preserved with the data. •\ TIMESTAMP WITH LOCAL TIME ZONE: This is a Read More

An Overview of Oracle Datatypes-Datatypes-1

Oracle provides 23 different SQL datatypes. Briefly, they are as follows: •\ CHAR: A fixed-length character string that will be blank padded with spaces to its maximum length. A non-null CHAR(10) will always contain 10 bytes of information using the default National Language Support (NLS) settings. We will cover NLS implications in more detail shortly. Read More

Auto Indexing Wrap-Up-Indexes

Does this mean the DBAs and application developers don’t need to worry about indexing anymore? Far from it. Even with automatic indexing, you still need to monitor the system and ensure that the indexing is doing what you think it should do. You’ll haveinsights into your database and application code that the auto indexing feature Read More

Automatic Indexing in Action-Indexes

Now that you have some background with the automatic indexing feature, let’s enable it and see how it works:$ sqlplus system/foo@PDB1SQL> exec dbms_auto_index.configure(‘AUTO_INDEX_MODE’,’IMPLEMENT’); PL/SQL procedure successfully completed. Next, I’ll create a table to test with:$ sqlplus eoda/foo@PDB1SQL> create table d (d varchar2(30));Table created. Now I’ll insert some random number data into this table:SQL> insert into Read More

Managing Automatic Indexing-Indexes

Automatic indexing is managed via the internal DBMS_AUTO_INDEX PL/SQL package. The default mode of automatic indexing is REPORT ONLY. In this mode, automatic indexing is on, but any indexes it creates are invisible (meaning the indexes won’t be used by the optimizer). You can enable/disable indexing at the root container level or at the pluggable Read More

Automatic Indexing-Indexes

Starting with version 19c, the Oracle database ships with an automatic indexing feature. This allows you to delegate some index management features to the database. This feature creates, rebuilds, and drops indexes based on the workload of your application. Indexes that are managed by this feature are known as auto indexes. Here are the main Read More

Why Isn’t My Index Getting Used?-Indexes-2

Case 4We have indexed a character column. This column contains only numeric data. We query using the following syntax:SQL> select * from t where indexed_column = 5 Note that the number 5 in the query is the constant number 5 (not a character string). The index on INDEXED_COLUMN is not used. This is because the Read More

1 2 3 4