Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Calling an SP takes over 200% more time over the select statement

$
0
0

Hey Bill,

 

Why don't you use an Analytic View to frame an equivavalent of the below sql statement you used:

 

SELECT  TOP 20   C_F_NAME,            C_L_NAME,            C_EMAIL,            O_ID,            O_TOTAL,            O_DTS,            O_FM_DTS
FROM    dbo.Customer JOIN dbo.Orders ON C_ID = O_C_ID
WHERE   C_ID = :C_ID    ORDER   BY O_ID DESC;
END;

Is the aggregation not required on "TOTAL" ?  ( If this is a detailed report, you can use with Attribute View itself )

 

And then use analytic view or if you still want to use Script based view ( for anyother reasons ) you can frame your select statement on the Analytic View

 

Regards,

Krishna Tangudu


Viewing all articles
Browse latest Browse all 9165

Trending Articles