Suppose you have a very large database, and to simplify lets say it consists of one major table you will be doing your lookups on with one (and only one) primary key field - pk
.
Given the fact that all lookups are going to be basically SELECT * FROM table_name WHERE pk=someKeyValue
, what is the best way to optimize this database for the fastest lookups?
Edit: just a few more details - INSERT
s and UPDATE
s are going to be very non-frequent so I don't mind sacrificing performance there to achieve better lookup performance.
Also, seems like clustering is the way to go. Do you have any examples of the kind of increase in performance I can achieve with this method? And how exactly is this done (on any kind of DB)?