Re: Index-only quals

Поиск
Список
Период
Сортировка
Искать
От
Heikki Linnakangas
Тема
Re: Index-only quals
Дата
Msg-id
4A8E9218.2070206@enterprisedb.com
Ответ на
Список
Дерево обсуждения
Index-only quals Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Index-only quals Bruce Momjian <bruce@momjian.us>
Re: Index-only quals Greg Stark <gsstark@mit.edu>
Re: Index-only quals Greg Stark <gsstark@mit.edu>
Re: Index-only quals Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Index-only quals Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Re: Index-only quals Jaime Casanova <jcasanov@systemguards.com.ec>
Re: Index-only quals Tom Lane <tgl@sss.pgh.pa.us>
Re: Index-only quals Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Greg Stark wrote:
> On Fri, Aug 21, 2009 at 12:43 PM, Heikki
> Linnakangas wrote:
>> Here is an updated version of my patch to return data from b-tree
>> indexes, and use it to satisfy quals.
> 
> + 			if (!found_clause && useful_pathkeys == NIL && !useful_predicate)
> + 				ipath->scantype = ST_INDEXSCAN;
> + 			else
> + 			{
> + 				ipath->scantype = 0;
> + 				if (index->amhasgettuple)
> + 					ipath->scantype |= ST_INDEXSCAN;
> + 				if (index->amhasgetbitmap)
> + 					ipath->scantype |= ST_BITMAPSCAN;
> + 			}
> +
> 
> 
> Does this section need to check amhasgettuple for the index-only scan
> case as well? It looks like right now if an indexam has amregurgitate
> set but not amhasgettuple then weird things could happen.

We check earlier in the function before we construct indexonlyQuals that
the index has amhasgettuple. Hmm, can you find an easier-to-understand
way to write that?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com

В списке pgsql-hackers по дате отправления
От: Greg Stark
Дата:
Сообщение: Re: Index-only quals
От: Heikki Linnakangas
Дата:
Сообщение: Re: Index-only quals
FAQ