The present invention relates to an optimization method in a database management
system having the function of accessing external databases. Conventionally, whether
functions contained in a query can be executed in external databases depends on
a database management system having the functions, and therefore there has been
a problem in that a database utilization method cannot apply to query optimization
and query execution performance is reduced. To solve the above problem, a database
management system having the function of accessing external databases is provided
with an optimization step comprising the steps of: obtaining specification about
whether to execute functions in a query in external databases; determining whether
data referred to in a query is confined to one database; and determining whether
a user specifies that the functions in the query are executed in external databases.