Re: R: Index on integer or on string field

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: R: Index on integer or on string field
Дата
Msg-id 36BC1A4C-4027-423C-9F07-00D72867C0EE@gmail.com
обсуждение исходный текст
Ответ на R: Index on integer or on string field  (Job <Job@colliniconsulting.it>)
Список pgsql-general
Are you saying your indexed field has only 50 distinct values? Seems a horrible candidate for an index. Might be good to partition on those fifty values but ten million records probably doesn't warrant that. 

Sent from my iPhone

On May 15, 2015, at 9:34 AM, Job <Job@colliniconsulting.it> wrote:

Hello Arthur!

So, i read that btree-gin have got "the ability to enforce uniqueness".
 
If in this 10.millions long table i have, in index, 50 recurring values, i can leave the alphabetical field and change to btree-gin the index on it?!

Thank you!
Francesco
 

Da: Arthur Silva [arthurprs@gmail.com]
Inviato: venerdì 15 maggio 2015 17.26
A: Job
Cc: pgsql-general@postgresql.org
Oggetto: Re: [GENERAL] Index on integer or on string field

You should probably experiment with a btree-gin index on those.

Em 15/05/2015 12:22, "Job" <Job@colliniconsulting.it> escreveu:
Hello,

i have a table of about 10 millions of records, with the index on a string field.
Actually is alphabetical; since queries are about 100/200 per seconds, i was looking for a better way to improve performance and reduce workload.

The unique values, of that fields, are about the 50 (category name), and we could create a second table to codify, with numerical integer values, the 50 recurring names.

Is index are integer and not characteral, performance are better and workload reduces?

Is there any comparisons?

Thank you!
Francesco

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Job
Дата:
Сообщение: R: Index on integer or on string field
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Restarting DB after moving to another drive