Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find out slow running SQL from a batch?

60 views
Skip to first unread message

rahul...@gmail.com

unread,
Apr 10, 2013, 3:37:40 AM4/10/13
to
Hi,

I am on Sybase 12.5 . One of our overnight batch is slowing down day by day, in production. From the Perl script, we call a stored procedure. There are not many print comnands in the procedure and there are several select, insert and updates in there. Hence it is not easy to conclude which SQL from the proc is slow.

How can I find out which SQL is slow? Is it possible to find out its plan from production (where we cannot run SQLs)?
Are there any sys views which can help me here?
I am not the DBA, but can the dba do anything?

Thanks in advance

r...@sypron.nl

unread,
Jun 1, 2013, 6:38:42 PM6/1/13
to
Use 'set showplan on' to capture the query plans, and 'set statistics io on' to determine the amount of I/O each statement takes. Another approach is to use the MDA tables to get similar information, for that, see www.sypron.nl/mda.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

r...@sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------
0 new messages