Re: Multicolumn index including tsvector.
От | Alban Hertroys |
---|---|
Тема | Re: Multicolumn index including tsvector. |
Дата | |
Msg-id | 54C5FD8A-0023-49ED-BF50-6C13894E7E72@solfertje.student.utwente.nl обсуждение исходный текст |
Ответ на | Multicolumn index including tsvector. (Kris Gale <krisgale@gmail.com>) |
Список | pgsql-general |
On 24 Nov 2009, at 24:08, Kris Gale wrote: > Table "public.example" > Column | Type | Modifiers > ---------+----------+----------- > body | text | > vectors | tsvector | > user_id | bigint | > > I've got btree_gin and btree_gist installed, so I can make a composite index on vectors and user_id (which is a bigint). A bigint for userid? How many billions of users do you expect to get? A bigint is 8 bytes or 64 bits. I think a normal int (32-bits) would be quite sufficient; it allows up to 2 billion users.It uses less storage space for both the data and the indices too. And as Tom already said casting can be a problem with bigints, not only if certain operators aren't defined for comparisonbetween int and bigint, but you'll also see a performance hit if table data you compare to needs to be upcastedto a bigint; joins come to mind. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4b0bc36e11738279827033!
В списке pgsql-general по дате отправления: