Symptom
When the same SQLs are batched with multiple commands in single "go", the optimizer chooses the costly merge join over the N-ARY join.
For example,
create table #aa(a1 int)
insert #aa values(1)
select * from aa, bb where aa.a1=bb.b1
go
/* This one is slow
create table #aa(a1 int)
go
insert #aa values(1)
go
select aa.a1 from aa, bb where aa.a1=bb.b1
go
/* This one is quick using N-ARY join
Read more...
Environment
SAP Adaptive Server Enterprise (ASE) 15.7
Product
Keywords
sp_showplan, sybase, optimizer, nary, N-ARY, nested loop join, 824267, performance
, KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Bug Filed
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview