Business Views

apickard

Member
When a UBE gets to the as400 server to run...does it use the index specifed in the BV or does the as400 look for and use the 'best access path' regardless of what is specified in the BV?
 
Hello, Sir, you probably misinterpreted the Column Primary indexes which you see after you opened a view in design mode with indexes created on given columns within a given table in a database.
I want to tell you that any database uses optimizer to determine the best cost of executing a query, for views it is normally a predefined way of either full table scan or using certain indexes, but you can never know what the database may used as it depends on many factors as table size, kind of index, where condition etc. There are ways to force the database to use a specific index but it is not always what you need.

Regards,

Arthur Zubarev
 
When in design mode you can right click a table and you are allowed to choose index. If you choose a index to where the key field is the same as the data-select field.....wouldn't the 400 use that index?
 
SQL runs a tool called an optimizer. The optimizer will select the best index or build an index if it feels needed. It will not necessarly use the index you have select within your program or business view. Although, it will normally use the index you picked.

Hope this helps
 
Back
Top