Differences between int8 and int4 as pkeys and fkeys

From: Thomas Swan <tswan(at)olemiss(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Differences between int8 and int4 as pkeys and fkeys
Date: 2000-08-04 20:01:20
Message-ID: 4.3.2.7.2.20000804145754.00b322c0@sunset.backbone.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

<html><div>Perhaps a little off topic.</div>
<br>
<div>I had been using int8 as primary / foreign keys pairs.&nbsp;&nbsp;
After joining several large tables on the keys, I noticed about a 30/40%
speed improvement just in changing the keys from int8 to int4 data
types.</div>
<br>
Should it affect it that much?
<br>

- <br>
- <b><u>Thomas Swan</b>
<x-tab>&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><br>
</u>- Graduate Student&nbsp; - Computer Science<br>
- The University of Mississippi<br>
- <br>
- &quot;People can be categorized into two fundamental <br>
- groups, those that divide people into two groups <br>
- and those that don't.&quot;</html>

Attachment Content-Type Size
unknown_filename text/html 882 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dale Anderson 2000-08-04 20:58:42 Upper limit of a TEXT field
Previous Message Philip Hallstrom 2000-08-04 18:30:14 Re: Need for rebuilding index after many deletions?

Browse pgsql-hackers by date

  From Date Subject
Next Message Dale Anderson 2000-08-04 20:58:42 Upper limit of a TEXT field
Previous Message Christopher Masto 2000-08-04 18:28:28 Re: random() function produces wrong range