It would be nice to have an index-only plan feature where a secondary-index search alone can generate and return the final result without traversing the primary index and applying the final verification using SELECT operator. The reason that we need to traverse the primary index (+ verification using a SELECT operator) is that we don't do any locking during the secondary-index search. Therefore, the secondary-index search is not authoritative. In order to give such authority, the proposed solution is that apply an instantTryLock on each PK found during the secondary-index search. This guarantees that we see the final result. For more details, refer to the following google doc.


https://docs.google.com/presentation/d/1Hj4ONmBWf5vf0EJrueygcoJirru2vy6eaCzmIiT0ypo/edit?usp=sharing

  • No labels