Re: pgsql: Allow GIN's extractQuery method to signal that nothing can

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Date: 2007-01-31 16:37:53
Message-ID: 26945.1170261473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> amcanmulticol doesn't resolve issue, because restriction clause might present,
> but it might have not any actual values ( void tsquery, void array ) and
> semantic meaning of void query might be a 'any tuple matches'. Suggested
> gincostestimation's patch allows to prevent from index in some situations, I
> imagine, that isn't a good solution for two reason:
> - high cost doesn't guarantee an indexscan will be choosen
> - Doesn't work with anything except Const query
> But I didn't find a better place to insert it to resolve first point.

If you're going to support operators that could allow every tuple to
match, then I think you had better find a way to allow a full index scan
within GIN. Because the above does not fix the problem, it's only a
very crude band-aid; you *cannot* assume that you'll always have Consts
to look at.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2007-01-31 16:46:59 Re: pgsql: Allow GIN's extractQuery method to signal that nothing can
Previous Message Teodor Sigaev 2007-01-31 16:19:50 Re: pgsql: Allow GIN's extractQuery method to signal that nothing can