Re: [PERFORM] Varchar pkey instead of integer

2008-05-21 Thread Robins Tharakan
On Wed, May 21, 2008 at 1:27 PM, J. Andrew Rogers <[EMAIL PROTECTED]> wrote: > > On May 21, 2008, at 12:33 AM, Shane Ambler wrote: > >> >> Size can affect performance as much as anything else. >> > > For a brief moment, I thought the mailing list had been spammed. ;-) > And that sums up why I wis

Re: [PERFORM] Varchar pkey instead of integer

2008-05-21 Thread J. Andrew Rogers
On May 21, 2008, at 12:33 AM, Shane Ambler wrote: Size can affect performance as much as anything else. For a brief moment, I thought the mailing list had been spammed. ;-) J. Andrew Rogers -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to you

Re: [PERFORM] Varchar pkey instead of integer

2008-05-21 Thread Craig Ringer
Shane Ambler wrote: Size can affect performance as much as anything else. In your case of limited rows it will make little difference, though the larger table with millions of rows will have this key entered for each row and be indexed as the foreign key. The real question is how you want to

Re: [PERFORM] Varchar pkey instead of integer

2008-05-21 Thread Shane Ambler
Craig Ringer wrote: 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 certa

Re: [PERFORM] Varchar pkey instead of integer

2008-05-20 Thread Craig Ringer
Robins Tharakan wrote: Hi, 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

Re: [PERFORM] Varchar pkey instead of integer

2008-05-20 Thread Joshua D. Drake
Robins Tharakan wrote: Hi, 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 ? One shou

[PERFORM] Varchar pkey instead of integer

2008-05-20 Thread Robins Tharakan
Hi, 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