index not used?

Поиск
Список
Период
Сортировка
От Dan Pelleg
Тема index not used?
Дата
Msg-id 16758.28881.684597.807409@lark.auton.cs.cmu.edu
обсуждение исходный текст
Ответы Re: index not used?  ("Scott Marlowe" <smarlowe@qwest.net>)
Список pgsql-general
I'm trying to access a table with about 120M rows. It's a vertical version
of a table with 360 or so columns. The new columns are: original item col,
original item row, and the value.

I created an index:

CREATE INDEX idx on table (col, row)

however, selects are still very slow. It seems it still needs a sequential
scan:

EXPLAIN SELECT * FROM table WHERE col=1 AND row=10;
                                  QUERY PLAN
------------------------------------------------------------------------------
 Seq Scan on table  (cost=100000000.00..102612533.00 rows=1 width=14)
   Filter: ((col = 1) AND ("row" = 10))

What am I doing wrong?

--
 Dan Pelleg

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

Предыдущее
От: Weiping
Дата:
Сообщение: Re: how much ram do i give postgres?
Следующее
От: "arvind"
Дата:
Сообщение: Oracle Varray to Postgres conversion problem