Re: problem: index on number not honoured

Поиск
Список
Период
Сортировка
От Roland Roberts
Тема Re: problem: index on number not honoured
Дата
Msg-id m2k7wsgfum.fsf@tycho.rlent.pnet
обсуждение исходный текст
Ответ на problem: index on number not honoured  ("Ilker Egilmez" <ilker@gate5.de>)
Список pgsql-sql
>>>>> "Ilker" == Ilker Egilmez <ilker@gate5.de> writes:

   Ilker> an index on a table column of any number type only gets honoured if you   Ilker> query it like a string,
e.g.
   Ilker> create table t1 ( n int2 ) ;
   Ilker> create index t1n on t1 (n) ;
   Ilker> explain select * from t1 where n = 1 ;
   Ilker> -- Seq Scan on t1  (cost=0.00..22.50 rows=10 width=2)
   Ilker> explain select * from t1 where n = '1'  ;
   Ilker> -- Index Scan using t1n on t1  (cost=0.00..8.14 rows=10 width=2)

Two questions: have you run vacuum analyze on the table?  have you
submitted a bug report?

roland
--            PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@rlenter.com                     76-15 113th Street, Apt 3B
roland@astrofoto.org                       Forest Hills, NY 11375


В списке pgsql-sql по дате отправления:

Предыдущее
От: Roland Roberts
Дата:
Сообщение: Re: INSERT question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unable to use '-' in column names in PLPGSQL