Patch implements much more accuracy estimation of cost for GIN index scan than
generic cost estimation function. Basic idea is described on PGCon-2010:
http://www.sai.msu.su/~megera/postgres/talks/pgcon-2010-1.pdf, pages 48-54.
After discussion on PGCon, the storage of additional statistic information has
been changed from pg_class table to meta-page of index. Statistics data is
cached in Relation->rd_amcache to prevent frequent read of meta-page.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/