1. A method performed by a memory storing machine-readable instructions executed by a processor for generating a choose tree, the method comprising: receiving a source code indicative of each partition of a range partitioned database table; and generating the choose tree from the source code at compile time, the choose tree being representative of a pre-computed binary search of the range partitioned database table, wherein generating the choose tree from the source code at compile time determining at least one choose tree policy; determining a number of bounds M within the range partitioned database based on the determined choose tree policy, and wherein forming the choose tree is responsive to the determined number of bounds; determining a low bound for each partition; determining a high bound for each partition; setting a flag for each bound based on whether the bound is inclusive or exclusive, wherein an exclusive high bound for a particular bound implies an inclusive low bound for an adjacent bound, and wherein an inclusive high bound for a particular bound implies an exclusive low bound for an adjacent bound; determining whether the bound includes a minimum value for the range partitioned database; determining whether the bound includes a maximum value for the range partitioned database; and optimizing a tree node out of the choose tree based on the determinations of whether the bound includes a minimum value or a maximum value.