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 6121267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:45:53+00:00 2026-05-23T15:45:53+00:00

Assuming PostgreSQL is running on a 64 bit server, what is the performance difference

  • 0

Assuming PostgreSQL is running on a 64 bit server, what is the performance difference between an int4 (32 bit) and int8 (64 bit) column? The manual states that int4 is more efficient than int8, but if the underlying server is 64 bit, is there a practical performance difference (in terms of (1) cpu, (2) memory and (3) storage)?

  • 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-05-23T15:45:54+00:00Added an answer on May 23, 2026 at 3:45 pm

    in terms of (1) cpu, (2) memory and (3) storage

    Put bluntly:

    1. 64 bits is twice as large as 32 bits.

    2. 64 bits is twice as large as 32 bits.

    3. 64 bits is twice as large as 32 bits.

    I recall a thread in wp-hackers that did a few benchmarks. Create a table, fill in a million rows. Then find, add, group, join, etc. I don’t recall the specifics, but it was indeed slower to be using int8 than int4.


    test=# create table int4_test (id int primary key);
    CREATE TABLE
    test=# create table int8_test (id bigint primary key);
    CREATE TABLE
    test=# insert into int4_test select i from generate_series(1,1000000) i;
    INSERT 0 1000000
    test=# insert into int8_test select i from generate_series(1,1000000) i;
    INSERT 0 1000000
    test=# vacuum analyze;
    VACUUM
    test=# \timing on
    Timing is on.
    test=# select sum(i.id) from int4_test i natural join int4_test j where i.id % 19 = 0;
         sum     
    -------------
     26315710524
    (1 row)
    
    Time: 1364.925 ms
    test=# select sum(i.id) from int4_test i natural join int4_test j where i.id % 19 = 0;
         sum     
    -------------
     26315710524
    (1 row)
    
    Time: 1286.810 ms
    test=# select sum(i.id) from int8_test i natural join int8_test j where i.id % 19 = 0;
         sum     
    -------------
     26315710524
    (1 row)
    
    Time: 1610.638 ms
    test=# select sum(i.id) from int8_test i natural join int8_test j where i.id % 19 = 0;
         sum     
    -------------
     26315710524
    (1 row)
    
    Time: 1554.066 ms
    
    test=# select count(*) from int4_test i natural join int4_test j where i.id % 19 = 0;
     count 
    -------
     52631
    (1 row)
    
    Time: 1244.654 ms
    test=# select count(*) from int4_test i natural join int4_test j where i.id % 19 = 0;
     count 
    -------
     52631
    (1 row)
    
    Time: 1247.114 ms
    test=# select count(*) from int8_test i natural join int8_test j where i.id % 19 = 0;
     count 
    -------
     52631
    (1 row)
    
    Time: 1541.751 ms
    test=# select count(*) from int8_test i natural join int8_test j where i.id % 19 = 0;
     count 
    -------
     52631
    (1 row)
    
    Time: 1519.986 ms
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assuming ProductId is INT column, what is the difference between writing 3 and N'3'?
Assuming network access is sporadic with no central server, what would be the best
Assuming I have an open source web server or proxy I can enhance, let's
Assuming a fluid layout is not an option (since that is a different discussion
Assuming that it's even possible, what would be your recomendations to make a bundle
Assuming I have a class with a method that takes a System.Linq.Expressions.Expression as a
Assuming that I have the following directory structure for a Python project: config/ scripts/
assuming I running Scala 2.8.0 RC1, the following scala code should print out the
Assuming I have a schema that describes a root element class Root that contains
Assuming that a table contains sufficient information to warrant an index seek, at what

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.