Primary clustering causes performance degradation for both insertions and queries in a linear probing hash table. Insertions must travel to the end of a run, and therefore take expected time \Theta(x^2). Negative queries (i.e., queries that are searching for an element that turns out not to be present) must also travel to the end of a run, and thus also take expected time \Theta(x^2). Positive queries can terminate as soon as they find the element that they are searching for. As a result, the expected time to query a
random element in the hash table is \Theta(x). However, positive queries to recently-inserted elements (e.g., an element that was just inserted) take expected time \Theta(x^2). These bounds also hold for linear probing with
lazy deletions (i.e., using tombstones for deletions), as long as the hash table is rebuilt (and the tombstones are cleared out) semi-frequently. It suffices to perform such a rebuild at least once every n/(2x) insertions. == Common misconceptions ==