Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indexes that point directly to the disk column are also significantly faster to access; it is a persistent pain point for OLAP on InnoDB that all secondary indexes are indirect. You can work around it by adding additional columns to the index to make your lookups covering, but it's kludgy and imprecise and tends to bloat the index even further. (The flip side is that if you have tons of indexes, and update some unrelated column, InnoDB doesn't need to update those indexes to point to the location of the new row. But I'm generally very rarely annoyed by that in comparison.)


On commercial databases from Oracle and Microsoft, you can cluster the DB on any index. Really would love for Postresql to do the same.


You can but new rows will not be clustered until you re-cluster.

CLUSTER table_name USING index_name;


I remember that for MySQL MyISAM (syntax was different) in the olden days. I thought Oracle let you do it though. My bad.

MySQL Innodb and other have real clustered primary key indexes with all the pluses and minuses that entails.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: