User`s guide
Note:
If all of the conditions in an AND situation can be satisfied on the server or in the database DLL, the
program passes them all down.
• OR situations
{customer.REGION} = "CA" or
{customer.CUSTOMER ID}[3 to 5] = "777")
In this situation, the program also sees that it can pass down the condition before the Or operator
but not the condition after. Since there are records that can satisfy the second condition without
satisfying the first, passing the first condition down does not make any sense because it will retrieve
an incomplete data set. In other words, even if it retrieves all the data that satisfies the first condition,
it will still have to retrieve all the data in the table(s) before it can apply the second condition in Report
Designer. Thus, instead of duplicating parts of the data retrieval, the program passes nothing down.
It retrieves all the data and then runs both tests in Report Designer. The rule for OR situations is
that the program either passes down all the tests, or none of the tests.
Note:
If all the tests in an OR situation can be performed on the server or in the database DLL, the program
passes them all down.
23.5.6.2 Consideration 2
To make certain the program can use the index on Table A to enhance performance, make certain:
• There is a selection formula.
• There are range limits in the selection formula on the key (indexed) field in Table A.
• Use Indexes is selected in the Options dialog box.
23.5.6.3 Consideration 3
If the fields you are using from Table A are not indexed, but there is an indexed field that you can use
in your record selection request, use that field. For example, assume that you have three products
(Product 1, Product 2, and Product 3) and you want to identify all sales of Product 2 in the U.S. There
is no index on the Product field but there is an index on the Order Date field. Since you know that
Product 2 did not begin shipping until July of 1995, you can improve speed by limiting your report to
orders placed in and after July 1995 using the selection formula. In such a case, the program uses the
Order Date index to retrieve only those orders from July 1995 and afterward (a small subset of the
entire database) and then searches for the occurrences of Product 2 in that subset, not in the entire
database.
2012-03-14528
Understanding Databases