web analytics
Skip to primary content
Skip to secondary content

MemoSoup

Mix of the things I always forget

MemoSoup

Main menu

  • Home
  • About
  • Links

Tag Archives: performance

Oracle: plan of the running query

Posted on 29/12/2009 by bigspoon
Reply

col object_name for a40

select operation,
options,
object_name,
partition_id
from v$sql_plan
where address in
( select sql_address from v$session where sid = &sid.)
order by id;

Posted in Oracle | Tagged Oracle, performance, plan | Leave a reply

MS SQL: long running queries

Posted on 23/09/2009 by bigspoon
Reply


select spid,cmd,status,loginame,open_tran,
datediff (s,last_batch,getdate()) as [Waittime (s)]
from master..sysprocesses p
where open_tran > 0
and spid > 50
and datediff (s,last_batch,getdate()) > 30
and exists ( select * from master..syslockinfo
where req_spid=p.spid and rsc_type <>2)

Posted in MS SQL | Tagged MS SQL, performance | Leave a reply

Oracle: long running queries

Posted on 22/09/2009 by bigspoon
Reply


col opname for a40
col units for a10

SELECT sid
,opname
,sofar
,totalwork
,units
,elapsed_seconds
,time_remaining
FROM v$session_longops
WHERE sofar != totalwork;

Posted in Oracle | Tagged longops, Oracle, performance | Leave a reply

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress