Optimizes a database by physically removing deleted queries. It may physically re-order the queries for speed as well. After calling rxOptimizeDatabase each query may have a new query number. It is best not to assume that these numbers will remain constant in your code. You don't need to call rxOptimizeDatabase that often. If you database grows too big though or if you are making many changes you should call it.
void rxOptomizeDatabase( RouteX Router, StatusCodeT *Status )
Router The RouteX object you are deleting Status A pointer to a value of type StatusCodeT. If an error occurs during the execution of the function a value representing the error will be stored in *Status. You should check *Status after every function call.
rxOpenRouterDatabase, rxCloseRouterDatabase, rxDeleteQuery
// oldquerynumber is the query number we wish to delete rxDeleteQuery( Router, oldquerynumber, Status ); if( *Status < 0 ) return; // after deleting a whole bunch of queries we now optimize our database rxOptomizeDatabase( Router, Status ); if( *Status < 0 ) return;