Hi Mike,
Ok, I got it.
Most information of set option show_* output are for engineering to investigate an issue.
Please set show_pio_costing on instead of show_lio_costing
and then you can find estimated join cost for each join condition.
ASE uses a cost-based optimizer and it selects the cheapest cost of them as final plan.
For example,
set rowcount 5
go
set option show_pio_costing on
go
select * from sysobjects, sysindexes where sysobjects.id=sysindexes.id
go
After running the sql, you can find some estimated join costing and the final plan selected by optimizer.
( PopNlJoin ( PopRidJoin ( PopIndScan csysindexes sysindexes ) ) ( PopRidJoin ( PopIndScan csysobjects sysobjects ) ) )
cost:243.8729 T(L10.83051,P8.830508,C14.49153) tempdb:0 order: none
( PopMergeJoin ( PopRidJoin ( PopIndScan csysindexes sysindexes ) ) ( PopRidJoin ( PopIndScan csysobjects sysobjects ) )
) cost:262.3606 T(L9.333358,P8.746773,C250.2458) O(L0,P0,C228) tempdb:0 order: none
( PopNlJoin ( PopRidJoin ( PopIndScan csysindexes sysindexes ) ) ( PopRidJoin ( PopIndScan csysobjects sysobjects ) ) )
cost:243.8729 T(L10.83051,P8.830508,C14.49153) tempdb:0 order: none
( PopMergeJoin ( PopRidJoin ( PopIndScan csysobjects sysobjects ) ) ( PopRidJoin ( PopIndScan csysindexes sysindexes ) )
) cost:286.7606 T(L9.333358,P8.746773,C494.2458) O(L0,P0,C472) tempdb:0 order: none
( PopNlJoin ( PopRidJoin ( PopIndScan csysobjects sysobjects ) ) ( PopRidJoin ( PopIndScan csysindexes sysindexes ) ) )
cost:238.9948 T(L13.9181,P8.322345,C31) tempdb:0 order: none
FINAL PLAN ( total cost = 238.9948 ):
lio=13.9181 pio=8.322345 cpu=31 tempdb=0
ASE optimizer selected last Nested Loop Join because it was the cheapest cost.
thanks,
Jongun Seo