An optimized query processing system and method for a database system. The
database system includes a table of data and an index correlated to both
the query and to the table. The optimized query processing system
includes an index accessing module adapted to access the index to
determine if the table contains an entry satisfying a query predicate;
and a tablescan module for scanning substantially the entire table and
retrieving data satisfying the query. A method is also disclosed for
generating database diagnostic data.