Improve Performance by Reducing Column Size

Improve Performance by Reducing Column Size

During design time, you generally allocate some space to the columns by default. When it comes to tweaking performance, you may try to go back to the design and reduce column size in order to save memory space. This method is just not possible in most tables that contain data. Here’s a trick for reducing column size:

 DESC EMPLOYEE Name                            Null?    Type ------------------------------- -------- ---- EMPNO                           NOT NULL NUMBER(4) ENAME                                    VARCHAR2(100) JOB                                      VARCHAR2(10) MGRID                                    NUMBER(4) JOINDATE                                 DATE DEPTID                                   NUMBER(2)

The following code reduces the size of the column ENAME from 100 to 50.

drop table TEMP_TABLE;create table TEMP_TABLE as select rowid rowid_xx, ENAME from EMPLOYEE;create index TEMP_TABLE on TEMP_TABLE (rowid_xx);alter table EMPLOYEE modify (ENAME NULL);update      EMPLOYEE    set  ENAME = NULL;alter table EMPLOYEE modify (ENAME VARCHAR2(50));update      EMPLOYEE    set  ENAME = (     select ENAME from TEMP_TABLE where rowid_xx = EMPLOYEE.rowid);drop table TEMP_TABLE;
Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of