Re: Proposal: q-gram GIN and GiST indexes
От | Alexander Korotkov |
---|---|
Тема | Re: Proposal: q-gram GIN and GiST indexes |
Дата | |
Msg-id | BANLkTi=vY-MG_eyyONEqPj4uy3fOY=P0qg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposal: q-gram GIN and GiST indexes (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Proposal: q-gram GIN and GiST indexes
|
Список | pgsql-hackers |
On Tue, Apr 5, 2011 at 5:05 PM, Robert Haas <robertmhaas@gmail.com> wrote:
----
With best regards,
Alexander Korotkov.
rows grow proportionately to the number of n-grams?I am probably being stupid here, but doesn't the number of links to
Number of links to rows grow proportionally to total number of extracted q-grams, but not proportionally to number of unique q-grams. Though, if extracted q-grams are not unique inside same indexed value, then it can reduce number of links (but it is rarity).
Lets consider simple example. Two rows contains strings 'aaa' and 'aaab'. We extract 3-gram 'aaa' from first string and 3-grams 'aaa' and 'aab' from second string (for simplicity, there is no padding here). GIN index will contain structure, which can be represented so:
'aaa' => 1, 2
'aab' => 2
We can see, that there are 2 unique 3-grams, but 3 links to the rows.
----
With best regards,
Alexander Korotkov.
В списке pgsql-hackers по дате отправления: