Index selection bug

Поиск
Список
Период
Сортировка
Искать
От
Andriy I Pilipenko
Тема
Index selection bug
Дата
Msg-id
Pine.BSF.4.21.0007260917440.51996-100000@bamby.marka.net.ua
Список
Дерево обсуждения
Index selection bug Andriy I Pilipenko <bamby@marka.net.ua>
Re: Index selection bug Tom Lane <tgl@sss.pgh.pa.us>
Bug with 'iscachable' attribute (Was: Index selection bug) Andriy I Pilipenko <bamby@marka.net.ua>
Re: Bug with 'iscachable' attribute (Was: Index selection bug) Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug with 'iscachable' attribute (Was: Index selection bug) Tom Lane <tgl@sss.pgh.pa.us>
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Andriy I Pilipenko
Your email address      : bamby@marka.net.ua


System Configuration
---------------------
  Architecture (example: Intel Pentium)         : Intel Pentium

  Operating System (example: Linux 2.0.26 ELF)  : FreeBSD 3.x

  PostgreSQL version (example: PostgreSQL-7.0):   PostgreSQL-7.0.2

  Compiler used (example:  gcc 2.8.0)           : gcc 2.7.2.3


Please enter a FULL description of your problem:
------------------------------------------------

PostgreSQL refuses to use index if WHERE clause contains function call.
This problem exists in 6.5.3 also.


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

Do following queries:

	create table t (f int);

	create index i on t (f);

	create function func() returns int as 'select 1' language 'sql';

	set enable_seqscan to 'off';

	explain select * from t where f = 1;

	  Index Scan using i on t  (cost=0.00..2.01 rows=1 width=4)

	explain select * from t where f = func();

	  Seq Scan on t  (cost=100000000.00..100000001.34 rows=1 width=4)


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
Сообщение: Re: Index selection bug
FAQ