An object-oriented approach for extensible query optimization