[TYPO3-50-general] Evaluating FLOW3 for a new project
Ries van Twisk
typo3 at rvt.dds.nl
Thu Apr 9 18:34:25 CEST 2009
On Apr 9, 2009, at 11:14 AM, Martin Kutschker wrote:
> Ries van Twisk schrieb:
>>>
>>>> It's not really awkward once you know the implementation
>>>> and why it was created in such a way.
>>>
>>> I only read the docs and it wasn't an easy read for me ;)
>>
>> We put indexes on the tables much like this:
>>
>> CREATE INDEX tbl_copy_translation_idx_ts_2
>> ON mkt.tbl_copy_translation
>> USING gin
>> (to_tsvector('english'::regconfig, copy))
>> WHERE lang_id = 2;
>
> Wow, I can add an index on a part of a table by using a WHERE
> clause?!?
> Amazing.
Essentially this is a functional index,
lang_id is a field in my table that tells the system in what language
the content was written.
The above code creates gin index using english as teh language and only
the records with lang_id=2 (english) will be indexed.
if lang_id=3, for example Dutch you can do this:
CREATE INDEX tbl_copy_translation_idx_ts_3
ON mkt.tbl_copy_translation
USING gin
(to_tsvector('dutch'::regconfig, copy))
WHERE lang_id = 3;
This way you will not have one huge index for all languages (which
doesn't make much sense anyways)
but you create a bunch of smaller indexes for each language.
>
>> The table has a record for each language in the same table. We
>>
>> lang_id is in this case english, this speeds up the system
>> enormously.
>
> Something missing?
>
> Masi
More information about the TYPO3-project-5_0-general
mailing list