Search Postgresql Archives

help understanding analyze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux