I am currently designing a database and wanted to know something that may
sound trivial, but I thought its still good to confirm before dumping
millions of rows in it.
The design requires a few master tables with very limited rows, for e.g.
currency_denomination table could at the max have a few records like million
/ billion / crore (used in india) / lacs (india specific) and so on.
Now what I wanted to ask was whether its any different to have the
primary-keys in such master tables as text/varchar rather than integer ?
i.e. Can I use a character varying(10) and use the text 'million' /
'billion' instead of a serial / integer type ?
p.s.: I am not as much concerned with the size that it'd take on the data
tables, as much as the fact that the select / insert performances shouldn't
suffer. However, if that increase in size (per data record) may make a
considerable impact on the performance, I would certainly want to take that
into account during design phase.
Any pointers / replies appreciated.
pgsql-performance by date
|Next:||From: Joshua D. Drake||Date: 2008-05-21 06:16:34|
|Subject: Re: Varchar pkey instead of integer|
|Previous:||From: PFC||Date: 2008-05-20 20:54:23|
|Subject: Re: improving performance for a delete|