Patent attributes
An online index building operation is disclosed for building an index from source data with minimal loss of availability to the source data. The source data can be maintained in a relational database system, such as in a tablespace of a DB2® environment. The disclosed operation creates a consistent image of the source data as of a point-in-time and creates an index from the consistent image. Then, the disclosed operation repeats the acts of making the image consistent as of a subsequent point-in-time and updating the index to reflect the subsequent consistent image until substantially caught up with the current changes to the source data. If not caught up, the disclosed operation continues unless it is falling behind at which point the operation terminates. If it is caught up, the disclosed operation locks access to the source data, updates the image to reflect any final changes, updates the index, and allows access to the index.