indexes are not working for

Поиск
Список
Период
Сортировка
От Anshaj
Тема indexes are not working for
Дата
Msg-id Pine.LNX.4.44.0410221037000.5072-100000@Unforgiven
обсуждение исходный текст
Ответ на Re: Linux not starting postgres automatically  (Devrim GUNDUZ <devrim@gunduz.org>)
Ответы Re: indexes are not working for
Re: indexes are not working for
Список pgsql-admin
Dear group,

         I have a table foo
anshajdb=# \d foo
           Table "public.foo"
 Column  |       Type        | Modifiers
---------+-------------------+-----------
 snumber | numeric(18,0)     |
 test    | character varying |
Indexes:
    "snum_idx" btree (snumber)

when I try to do a query like
explain analyze select * from foo where snumber > 1000;

Seq Scan on foo  (cost=0.00..69.00 rows=320 width=391) (actual
time=0.011..0.721 rows=323 loops=1)
   Filter: (snumber > 1000::numeric)
 Total runtime: 0.979 ms
(3 rows)
It do a sequence scan on table. Why it is not using the snum_idx in this
query. Do I need to change some setting or indexes don't work on this
types of query.


Thanks and Regards
Anshaj



 --
"Normal people believe that if it ain't broke, don't
fix it. Engineers believe that if it ain't broke, it
doesn't have enough features yet."


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

Предыдущее
От: Frans
Дата:
Сообщение: Re: Upgrading to 7.4.5
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: replication using WAL archives