[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
With Partial Indexes:
A partial index is any index with the one or more of the following
attributes.
. Created with a FOR condition
. Is Roll-Your-Own
. Was created UNIQUE
Mach SIx will only optimize a query condition using one of the above
types of indexes when the current order is set to that index. The
following example shows, when a partial index will and will not be used
to optimize a query.
USE Customers
INDEX ON Age TO Partial FOR Married
SET INDEX TO State, Name, Partial
SET ORDER TO 3
// Fully optimizable with order set to Partial index
? Is_Optimize() //...2
? "Counting..."
COUNT TO nCount
? "Poof!"
? nCount
SET ORDER TO 1
// Count not optimizable with order set to 1
? Is_Optimize() //...0
? "Counting..."
COUNT TO nCount
? "Finally..."
? nCount
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson