Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group