Tell me about a binary search implementation and the DBMS basics you rely on when reasoning about query performance.
Implement lower_bound(nums, target) to return the first index whose value is greater than or equal to target, or -1 when no such value exists. The input list is sorted in nondecreasing order; explain how logarithmic indexed lookup compares with a linear scan when reasoning about query performance.
nums is a sorted list of integers and target is an integer. Return an integer index.
def lower_bound(nums, target):