Index Usage Question

Поиск
Список
Период
Сортировка
От Staff, Alexander
Тема Index Usage Question
Дата
Msg-id F3C17DB1905CD311BC400008C75F40CE0CF095FE@dewdfx26.wdf.sap.corp
обсуждение исходный текст
Ответы Re: Index Usage Question
Список pgsql-general
Hi,
I created a simple table (name char200, zip char10, city char200, street char200, id int) and filled some data, appr.
250000 records, in it. 
I tested accessing some rows (select id from address where id = 44444;, select * from address where id between 33333,
333444)with an unique index on id and without an index. EXPLAIN tells me in both cases that it does NOT use the index. 
I tested this with using the name column (select name from address where name like 'Wal%';, select name from address
wherename = 'Walz') and if I created an index on name it uses it.  
Using id in the where clause of the select is as slow as using an unindexed name in the where-clause.
I ran ANALYZE, no changes.
What's this ?
This is not a feature, is it ?

Thanks for any hints or explanations
Ciao
Alexander

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

Предыдущее
От: Bob Messenger
Дата:
Сообщение: Re: Simple SQL
Следующее
От: Alexander Vlasenko
Дата:
Сообщение: extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax