Re: Understanding "seq scans" - Mailing list pgsql-general

From Lele Gaifax
Subject Re: Understanding "seq scans"
Date
Msg-id 87io6b6y3o.fsf@metapensiero.it
Whole thread Raw
In response to Understanding "seq scans"  (Lele Gaifax <lele@metapensiero.it>)
Responses Re: Understanding "seq scans"  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-general
Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> So 10% of your rows in the master_l10n table start with "quattro"?
> That's pretty odd, isn't it?  How did you manufacture these data?

Well, not a real scenario for sure, but definitely not odd: I just needed an
"extremely" big dataset to test out several different strategies, both on
table layout and indexes. The tables are populated by mechanically translating
the integer primary key into the corresponding "in words" string (1 -> "one")...

See https://gitlab.com/lelix/hstore4l10n for details.

> I wonder if the l10n_text_index index should be on (lang, lower(text)).

Oh wow, thank you for this enlightment! Sure, that's the problem indeed!

> How often are you going to look for translated text without specifying a
> language?

Never. The most frequently used criteria is «LIKE '%word%'» in the context of
a user session, and thus with a "preferred language".

Thank you again,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BDR: no free replication state could be found
Next
From: Lele Gaifax
Date:
Subject: Re: Understanding "seq scans"