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

As a rule of thumb, a table that grows over time probably has a "creation time" field, and a query that touches one row probably touches other rows created around the same time (like a weekly report). Since rows are probably stored on disk in chronological order, you can index the "creation time" field and do a good job, but if your primary key is already roughly chronological you may be able to get away with one fewer index and keep inserts/updates cheaper.


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

Search: