Other user-defined data type design considerations

When you design a new user-defined data type to store multidimensional data, include all the dimensions likely to be used in a query.

For example, suppose you are designing a user-defined data type to store information on beach resorts for a travel application. Because queries for resorts often include a time element, such as the time of high and low season rates for a particular resort, you might want to include a time dimension in the resort data type, as well as the usual location. When you create an R-tree index on a column of this data type, the time dimension is built into the index, and queries that specify time might execute faster.

Include dimensions that are also selective. This means that the values in a particular dimension effectively separate desired data from undesired data. For example, latitude and longitude spans are probably selective in a database of satellite photos because they can separate out just the few pictures in an area of interest from many other pictures scattered over the earth.