help understanding analyze

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема help understanding analyze
Дата
Msg-id 200612081253.12092.fluca1978@infinito.it
обсуждение исходный текст
Ответы Re: help understanding analyze  (Bill Moran <wmoran@collaborativefusion.com>)
Re: help understanding analyze  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: help understanding analyze  ("Shoaib Mir" <shoaibmir@gmail.com>)
Список pgsql-general
Hi all,
excuse me for this trivial question, but here's my doubt:
create table person(varchar id, varchar surname, varchar name)
with id primary key. Now, the query:
select * from person order by surname,name
provide me an explaination that is sequential scan + sort, as I expected.
After that I build an index on surname,name (clustered) and run vacuum to
update statistics. Then I ran again the query and got the same results (scan
+ sort) with the same time.
Now my trivial question is: why another sort? The index is clustered so the
database should not need to sort the output, or am I using wrong the tools?
Someone can explain me that?

Thanks,
Luca

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Marking indexes out of date (WAS: loading data, creating indexes, clustering, vacuum) feature request?
Следующее
От: "Angva"
Дата:
Сообщение: Re: loading data, creating indexes, clustering, vacuum...