From: | Lele Gaifax <lele(at)metapensiero(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Understanding "seq scans" |
Date: | 2015-10-13 17:54:57 |
Message-ID: | 87y4f664cu.fsf@metapensiero.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> I imagined it would be something like that. It's not the most useful
> set of test data, precisely because it doesn't accurately reflect what
> you're going to have in practice. I suggest you enter some actual text,
> even if it's just text from Don Camillo or whatever.
Sure, of course. The goal was more exercising the hstore type, which I have
never used before, and to find a good index strategy.
>> Never. The most frequently used criteria is «LIKE '%word%'» in the context of
>> a user session, and thus with a "preferred language".
>
> Be very careful with a % at the left. The index is not going to work at
> all there. It is not the same as looking for stuff without a % at the
> left.
Right, I know. I'm indeed surprised how fast it already is to scan the whole
table, in particular in the JSONB and HSTORE cases, where I didn't create an
index on the field!
Just for fun, I will try to learn about full text searches, another thing I
never used on PG, and if it works against an HSTORE field... I don't know yet
if I will need that machinery (current DB is still well under the million
records) though.
Thank you,
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.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2015-10-13 17:58:04 | Re: ID column naming convention |
Previous Message | Rob Sargent | 2015-10-13 17:43:55 | Re: ID column naming convention |