Patent ID: 7512599

Claim:
A method of operation within a database system, the method comprising: receiving a request to execute a query; in response to receiving the request to execute the query, before compiling the query for query execution, performing: determining that a collection of data elements to be returned by the query corresponds to a first data structure containing data fields, wherein the data fields are not specified by a data type definition within a type dictionary of the database system; obtaining attribute values that respectively describe the data fields within the first data structure; and recording, within the type dictionary, a first data type definition that specifies the data fields described by the attribute values; and removing the first data type definition from the type dictionary when a particular event occurs, wherein the particular event is an event from a set consisting of a) execution of the query is complete, b) a compilation of the query is deleted from system memory, or c) a process identifies a flag, in the first data type definition, that the first data type definition is a query duration type.