Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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: unknown_filename
Description: text/html (882 bytes)

In response to

Responses

pgsql-hackers by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group