Is SELECT WHERE [primary key] = [primary key value] O(1)?
问题 Is it right to expect that, for the typical modern RDBMS, querying by one specific primary key is as fast as querying a hashtable by key? Or is there "actual work" done to traverse the table and track down the primary key value? That seems unthinkably wasteful, even if there are automatic indexes for primary keys. 回答1: Database operation involves access of secondary memory unit (Disk). And to achieve efficiency important is to reduce block access time(not operations). Complexity of Select