multiple indexes

Status
Not open for further replies.

parul

Member
Pro Version 9.1d, OS win 2000

i have a table
"A"

indexes are
IDX: # main uniq Cid Div LoanNumber BudgetID LineItemID
IDX: MgmtApproval ambg MgmtApproval
IDX: QueueUser ambg QueueUser QueuePos


I want to query this table on these fields
CID, DIV, LOANNUMBER,BUDGETID,MGMTAPPROVAL,QUEUEUSER,QUEUEPOS.

I expected that progress would use multiple indexes
MAIN, MgmtApproval, QueueUser but ONLY MAIN index is selected.
If i remove BugetId from the query then only Mgmtapproval and QueueUser indexes are selected.

How can i change my query to use multiple indexes
MAIN, MgmtApproval, QueueUser ie all 3 of them.

The broader question is, how to force progress to use multiple indexes of our choice.
 

BONO

Member
Hello,
U're question is confused because i don't see why you want using differentt index for the same table in one query ?
So the choice of an index can be forced in code by different way but the main thing are :
- Query condition ( U can include condition in where clause or in the for each for example and let only condition in indexed fields ...)
The choice of an index depend of fields and condtion type used on where clause (= >= ...)
- Sort order (If u need break, the best way is to be on the field of an index so that you don't make many srt files)

The best choice for a request depend of many thing, and u've to choose between speed, band-width ......

Hope it's help
 

bendaluz2

Member
You will see great benefits if you add an index with

Cid, Div, LoanNumber, BudgetID

assuming every check in your where clause is an equality match

Hope that helps :)
 
Status
Not open for further replies.
Top