Re: Understanding "seq scans"

From: Lele Gaifax <lele(at)metapensiero(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Understanding "seq scans"
Date: 2015-10-13 07:12:27
Message-ID: 87io6b6y3o.fsf@metapensiero.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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(at)metapensiero(dot)it | -- Fortunato Depero, 1929.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lele Gaifax 2015-10-13 07:17:29 Re: Understanding "seq scans"
Previous Message Craig Ringer 2015-10-13 04:51:42 Re: BDR: no free replication state could be found