Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a command in Sybase similar to MySql 'show processlist'

Status
Not open for further replies.

ipalanisamy

Programmer
Aug 28, 2008
2
Hi,

I'm new to Sybase and I have worked in MySQL earlier.
I would like to findout a command which is similar to MySQL's 'show processlist' and 'show full processlist' commands.
This command I use to debug a slow query problems.
The MySQL 'show processlist' output looks like below.

In this output you will see, the connection information's like connection id, the time, the state, the query, etc.

It would be great if someone points to a similar command in SyBase Adaptive SQL Server.


mysql> show processlist;
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+
| 468 | root | localhost:1176 | webnmsdb | Sleep | 299 | | NULL |
| 469 | root | localhost:1177 | webnmsdb | Query | 3 | Opening tables | SELECT SQL_CALC_FOUND_ROWS merged_usr_960.id as usr_id,merged_flowSummary_961.deviceId as flowSumma |
| 470 | root | localhost:1178 | webnmsdb | Sleep | 299 | | NULL |
|
+-----+------+----------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+

mysql> show processlist;
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
|
| 469 | root | localhost:1177 | webnmsdb | Query | 24 | Copying to tmp table | SELECT SQL_CALC_FOUND_ROWS merged_usr_960.id as usr_id,merged_flowSummary_961.deviceId as flowSumma |
|
| 478 | root | localhost:1186 | webnmsdb | Query | 15 | Locked | LOAD DATA INFILE 'C:/ConSentry/InSight/data/unprocessedData/Device4700075_flowSummary_2008_08_28_00_ |
| 479 | root | localhost:1187 | webnmsdb | Sleep | 320 | | NULL |
|
+-----+------+----------------+----------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
 
Both the commands that you have mentioned is deprecated with the version SQL Anywhere 10.0.1.388.

Is there any other commands which has replaced these ones?

Also I would like to know the format of the log file content.

After I have enabled the log, I see the below output
=,<,4,EXEC_ANY_IMM,DELETE TOP 1000 FROM EVENTS WHERE (TIMESTAMP < 20070811031622, 0.000000001)
+937,<,2,CACHED_DROP_STMT,131121
=,>,2
=,<,2,VALIDATE_STMT,131121
=,>,2
=,<,2,OPEN,131121
+1,>,2,OPEN,131213
+3,<,2,CLOSE,131213
=,I,2,0,1,0,NOSCROLL*+READONLY+HOLD
=,>,2,CLOSE
=,<,2,COMMIT
=,>.,2
+2096,I,4,0,565,0,
=,W,4,122,The result returned is non-deterministic
=,>.,4
=,<,4,EXEC_ANY_IMM,commit
+193,>.,4

Want to understand how to read it?

Thanks,
Ila.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top