Re: R: [GENERAL] Index on integer or on string field

2015-05-15 Thread William Dunn
Hello Francesco, You should probably set timing on, run an explain analyze, and use pgbadger to diagnose your performance issue. While it may be the case that comparison in the index might be slightly faster because of the modulo arithmetic, those in-memory operations are extremely fast and it is

Re: R: [GENERAL] Index on integer or on string field

2015-05-15 Thread Arthur Silva
Yes that's my suggestion. Btree-Gin deals with lots of repeated values much better than the Btree index as repeated keys are only stored once. Em 15/05/2015 12:38, "Job" escreveu: > Hello Arthur! > > So, i read that btree-gin have got "the ability to enforce uniqueness". > > If in this 10.millio

Re: R: [GENERAL] Index on integer or on string field

2015-05-15 Thread Rob Sargent
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 wrote: > > Hello Arthur! > >

R: [GENERAL] Index on integer or on string field

2015-05-15 Thread Job
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: