Routing performance improvement - optimization for segments that contain exactly one literal or parameter subsegment