Обсуждение: pgsql: Remove QueryOperand->istrue flag, it was used only in cover
pgsql: Remove QueryOperand->istrue flag, it was used only in cover
От
teodor@postgresql.org (Teodor Sigaev)
Дата:
Log Message:
-----------
Remove QueryOperand->istrue flag, it was used only in cover ranking
(ts_rank_cd). Use palloc'ed array in ranking instead of flag.
Modified Files:
--------------
pgsql/src/backend/utils/adt:
tsquery.c (r1.6 -> r1.7)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery.c?r1=1.6&r2=1.7)
tsrank.c (r1.5 -> r1.6)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsrank.c?r1=1.5&r2=1.6)
pgsql/src/include/tsearch:
ts_type.h (r1.5 -> r1.6)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/tsearch/ts_type.h?r1=1.5&r2=1.6)
Re: pgsql: Remove QueryOperand->istrue flag, it was used only in cover
От
"Heikki Linnakangas"
Дата:
Teodor Sigaev wrote: > Remove QueryOperand->istrue flag, it was used only in cover ranking > (ts_rank_cd). Use palloc'ed array in ranking instead of flag. Nice, I played around that myself as well today. I tried to use Bitmapsets, instead of bool arrays, but that turned out to be significantly slower than the way it used to be. It looks like that bool-array method isn't, so that's good. Increasing the length field in QueryOperand doesn't actually help, because TSVector still only uses 11-bits for the length. And there's checks in tsquery.c that forbid values longer than MAXSTRLEN=2^11-1 anyway. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
> Nice, I played around that myself as well today. I tried to use
> Bitmapsets, instead of bool arrays, but that turned out to be
> significantly slower than the way it used to be. It looks like that
> bool-array method isn't, so that's good.
Yeah, hope so.
>
> Increasing the length field in QueryOperand doesn't actually help,
> because TSVector still only uses 11-bits for the length. And there's
> checks in tsquery.c that forbid values longer than MAXSTRLEN=2^11-1 anyway.
I know, but I doubt that rename istrue field to unused is much better.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/