是否可以将 Informix 临时表与通过 sysmaster 创建它的会话关联起来?
通过systabnames、systabinfo和sysdbstab,生成临时表(和哈希临时排序)和空间量的列表相当简单他们目前正在消费。
但是,当您有许多用户/进程运行相同的 SQL 并生成具有相同名称的临时表时,您最终会得到看起来高度重复的输出。
sysmaster 中是否有一个表,通过该表可以将临时表的partnum 与创建它的会话 关联起来?
Via systabnames, systabinfo and sysdbstab, it's fairly straightforward to produce a list of temp tables (and hash-temp sorts) and the amount of space they're currently consuming.
But when you have many users/processes running the same SQL and generating temp tables with the same name, you wind up with what appears to be highly duplicate output.
Is there a table in sysmaster via which the partnum of the temp table can be associated to the session that created it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
过去几年,这个问题在其他 Informix 相关论坛上被多次提出,但没有一个真正令人满意的答案。
您可能熟悉以下形式的某些变体:
应该使用 JOIN 表示法将其重写为:
但这仅提供您已经了解的信息。
我确实发现了一种使用
onstat -g opn
来检测打开的分区的技术,这些分区以某种方式通过onstat -u
连接回会话。不幸的是,onstat -g opn
报告的数据无法从 SMI 和 sysmaster 获得,因此这属于“ON-Stat 输出的脚本分析”类别。如果您希望我从一个不起眼的电子邮件帐户档案(大约 2007 年,IIRC)中挖掘详细信息,请发表评论。This question has been asked on a number of occasions over the past few years in other Informix-related forums, and there isn't a truly satisfactory answer.
You are probably familiar with some variant of:
which should be rewritten using JOIN notation as:
But this only gives the information that you already know about.
I did find a technique reported using
onstat -g opn
to detect open partitions that somehow connected back to the sessions viaonstat -u
. Unfortunately,onstat -g opn
is reporting data that is not available from SMI and sysmaster, so this would fall in the category of 'scripting analysis of ON-Stat output'. If you want me to dig the details, such as they were, out of an obscure email account's archive (circa 2007, IIRC), then leave a comment.