Smart completion optimization