Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9138833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:18:30+00:00 2026-06-17T09:18:30+00:00

Does the multiplication factor of a column’s length somehow influence the database performance? In

  • 0

Does the multiplication factor of a column’s length somehow influence the database performance?

In other words, what is the difference between the performance of the following two tables:

TBL1:
  - CLMN1 VARCHAR2(63)
  - CLMN2 VARCHAR2(129)
  - CLMN3 VARCHAR2(250)

and

TBL2:
  - CLMN1 VARCHAR2(64)
  - CLMN2 VARCHAR2(128)
  - CLMN3 VARCHAR2(256)

Should we always attempt to make a column’s length to some power of 2 or does only the maximum size matter?

Some of the developers claim that there is some link between the multiplication factor of the length of the columns in a database, because it influences how Oracle distributes and saves the data on the disk and shares its cache in memory. Can someone prove or disprove this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:18:30+00:00Added an answer on June 17, 2026 at 9:18 am

    There is no difference in performance. And there are no hidden optimizations done because of power of 2.

    The only thing that does make a difference in how things are stored is the actual data. 100 characters stored in a VARCHAR2(2000) column are stored exactly the same way as 100 characters stored in a VARCHAR2(500) column.

    Think of the length as a business constraint, not as part of the data type. The only thing that should driver your decision about the length are the business constraints about the data that is put in there.

    Edit: the only situation where the length does make a difference, is when you need an index on that column. Older Oracle versions (< 10) did have a limit on the key length and that was checked when creating the index.

    Even though it’s possible in Oracle 11, it might not be the wisest choice to have an index on a value with 4000 characters.

    Edit 2:

    So I was curious and setup a simple test:

    create table narrow (id varchar(40));
    create table wide (id varchar(4000));
    

    Then filled both tables with strings composed of 40 ‘X’. If there was indeed a (substantial) difference between the storage, this should show up somehow when retrieving the data, right?

    Both tables have exactly 1048576 rows.

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> set autotrace traceonly statistics
    SQL> select count(*) from wide;
    
    
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              1  db block gets
           6833  consistent gets
              0  physical reads
              0  redo size
            349  bytes sent via SQL*Net to client
            472  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    
    SQL> select count(*) from narrow;
    
    
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              1  db block gets
           6833  consistent gets
              0  physical reads
              0  redo size
            349  bytes sent via SQL*Net to client
            472  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    
    SQL>
    

    So the full table scan for both tables did exactly the same. So what happens when we actually select the data?

    SQL> select * from wide;
    
    1048576 rows selected.
    
    
    Statistics
    ----------------------------------------------------------
              4  recursive calls
              2  db block gets
          76497  consistent gets
              0  physical reads
              0  redo size
       54386472  bytes sent via SQL*Net to client
         769427  bytes received via SQL*Net from client
          69907  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
        1048576  rows processed
    
    SQL> select * from narrow;
    
    1048576 rows selected.
    
    
    Statistics
    ----------------------------------------------------------
              4  recursive calls
              2  db block gets
          76485  consistent gets
              0  physical reads
              0  redo size
       54386472  bytes sent via SQL*Net to client
         769427  bytes received via SQL*Net from client
          69907  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
        1048576  rows processed
    
    SQL>
    

    There is a slight difference in consistent gets, but that could be due to caching.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
Does the following psuedo code accomplish my goal of cleaning up after myself when
How does a computer perform a multiplication on 2 numbers say 100 * 55.
I wanted to know how the processor does multiplication in a multi-cycle data-path right
Strassen's algorithm is polynomially faster than n-cubed regular matrix multiplication. What does polynomially faster
What does it mean to say that a function (e.g. modular multiplication,sine) is implemented
I want to find geometric average of data and performance does matters. Which one
I'm trying to assess the performance differences between OpenCL for AMD and Nvidia GPUs.
Why does BLAS have a gemm function for matrix-matrix multiplication and a separate gemv
Reading through the following instruction table manual I see that integer multiplication is often

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.