Because of improvements and adjusted cost estimates to establish better query plans, the optimizer depends greatly on an accurate understanding of the underlying data distributions in certain cases. You might still think that a complex query does not execute quickly enough, even though you followed the guidelines in Creating Data Distributions. If your query involves equality predicates, take one of the following actions:
The following example shows a query that involves join columns:
SELECT employee.name, address.city FROM employee, address WHERE employee.ssn = address.ssn AND employee.name = 'James'
In this example, the join columns are the ssn fields in the employee and address tables. The data distributions for both of these columns must accurately reflect the actual data so that the optimizer can correctly determine the best join plan and execution order.
You cannot use the UPDATE STATISTICS statement to create data distributions for a table that is external to the current database. For additional information about data distributions and the UPDATE STATISTICS statement, see the IBM Informix: Guide to SQL Syntax.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]