Using PK value as a String

Поиск
Список
Период
Сортировка
От Jay
Тема Using PK value as a String
Дата
Msg-id 9e3be050-8b96-45d9-9bf3-b333bdee0405@i24g2000prf.googlegroups.com
обсуждение исходный текст
Ответы Re: Using PK value as a String  (Gregory Stark <stark@enterprisedb.com>)
答复: [PERFORM] Using PK value as a String  ("jay" <jackem.mojx@alibaba-inc.com>)
Список pgsql-performance
I have a table named table_Users:

CREATE TABLE table_Users (
   UserID       character(40)  NOT NULL default '',
   Username   varchar(256)  NOT NULL default '',
   Email          varchar(256) NOT NULL default ''
   etc...
);

The UserID is a character(40) and is generated using UUID function. We
started making making other tables and ended up not really using
UserID, but instead using Username as the unique identifier for the
other tables. Now, we pass and insert the Username to for discussions,
wikis, etc, for all the modules we have developed. I was wondering if
it would be a performance improvement to use the 40 Character UserID
instead of Username when querying the other tables, or if we should
change the UserID to a serial value and use that to query the other
tables. Or just keep the way things are because it doesn't really make
much a difference.

We are still in development and its about half done, but if there is
going to be performance issues because using PK as a String value, we
can just take a day change it before any production as been started.
Anyway advice you can give would be much appreciated.

Postgres performance guru where are you?

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Sabin Coanda"
Дата:
Сообщение: Re: long transaction
Следующее
От: Henrik
Дата:
Сообщение: Re: Filesystem benchmarking for pg 8.3.3 server