Link to home
Start Free TrialLog in
Avatar of joy_m
joy_mFlag for India

asked on

Sybase IO vs execution time

Hello experts,

Sometimes I have seen that some queries in Sybase takes very little amount of IO, but takes huge time to execute. What could be the reason for this? Any input with proper explanation would be helpful.

Thanks
Avatar of alpmoon
alpmoon
Flag of Australia image

It depends of what IO you are looking at. Are you checking only physical IO? Or is there any RPC going to another server?

Maybe you should provide the nature of query as well.
Avatar of joy_m

ASKER

Hi,

I am considering the logical as well as physical IOs here. Its not possible to put the query over here, because I am not considering any particualr query.

So, will it be possible to give some input on this?

Thanks
If it is the case, I think you should run sp_sysmon and work on the output:

sp_sysmon '00:10:00' -- for a 10 minute intreval

Also have you checked whether there is blocking during these periods? Or if it includes updates, deadlocks with some other transactions?
Avatar of joy_m

ASKER

Hi,

How do I check whether there are blockings or updates or deadlocks during the period as you said? Could you please explain a little bit more?

Thanks
If you set server configuration parameter 'print deadlock information' to 1 to monitor deadlocks:

sp_configure 'print deadlock information', 1

Then you can see deadlocks in errorlog.

To monitor blockings is not that easy. You can check it by sp_who or some other tools when the queries are running. sp_who output has a blk_spid colum. If it has a spid, it means that process is blocking the process on that line. Or you can write a script to check sysprocesses table regularly and report blockings.
ASKER CERTIFIED SOLUTION
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial