SAP Knowledge Base Article - Preview

2630072 - SQL query with "set rowcount" and abstract plan with optimization goal causes stack trace with OptGoal - SAP ASE

Symptom

  • ASE errorlog reports stack trace when running the SQL query containing 'set rowcoun' and abstract plan with system optimization goal
  • The following SQL causes the stacktrace

      set rowcount 30;

      SELECT
      distinct
      i.isin,
      0,
      suser_name(),
      getdate(),
      suser_name(),
      getdate() ,
      case when i.isin is null then i.issueId else null end
       from P2Issue i
       left join dbo.P2IsinRegAttribute ir on i.isin = ir.isin
       left join dbo.uToTvCalcQueue u on ((i.isin = u.isin) or (i.issueId = u.issueId)) and u.status in (0,9)
       where (i.isin is null or ir.isin is not null)
       and u.isin is null and u.issueId is null
       plan "(use optgoal allrow_mix)"

  • The following stacktrace in the errorlog

    OptGoal::ogGetFastfirstrowCt()+0x86()
    ::SeInitForFastfirstrow()+0x6d()
    ::SeInit()+0x789()
    :SeFindOptimalOptBlockPlan()+0x37()
    :_SeFindOptimalSaveThis()+0x1d()
    :_SeFindOptimal()+0x43()
    :SeFindOptimal()+0x34()
    OptGlobal::_GblSearchEngine(int*)+0x6b2()
    OptGlobal::GblOptimize(int*)+0xc6()


Read more...

Environment

SAP Adaptive Server Enterprise (ASE) 15.7 SP138

Product

SAP Adaptive Server Enterprise 15.7

Keywords

OptGoal::ogGetFastfirstrowCt , CR#782896, CR782896, 782896, , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.