本文介绍了增加jvisualVM OQL结果集的最大大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个内存转储文件,它有近5000个特定对象的实例。这些对象将写入数据库,我这样做的方法是在jvisualvm中编写一个OQL查询以生成一个字符串,该字符串将用作SQL插入,例如

I have a memory dump file which has nearly 5000 instances of a particular object. These objects are to be written into a DB, and the way i am doing this is to write an OQL query in jvisualvm to generate a string that will serve as an SQL insert for example

select "insert into trades (id, tradeNumber) values ("+ x.id+ ", " + x.tradeNumber +");" from com.test.application.TradeObject x;


当我通过OQL运行时,我得到一个结果集如下 -

When i run this via OQL, i get a result set like this -

<code>
insert into trades (id, tradeNumber) values (1,12345);
insert into trades (id, tradeNumber) values (2,123456);
insert into trades (id, tradeNumber) values (3,123457); </code>

但是,因为总数实例数量很大(大约5000)JvisualVM只显示其中的大约100个。然后出现错误消息结果太多。请优化您的查询。

However, since the total number of instances is large (around 5000) JvisualVM only shows about 100 of them. and then errors out with a message "Too many results. Please, refine your query."

我无法优化查询,因为我必须以这种方式解析所有实例。
有没有办法可以让JvisualVM向我显示所有实例而不限制结果数量?

I cannot refine the query as i have to parse all instances this way.Is there a way in which i can ask JvisualVM to show me all instances and not restrict the number of results?

我还看到Jvisual vm显示前100个没有任何过滤器的实例,是否可以通过OQL查询获得接下来的100个实例等等?

I also see that Jvisual vm shows the first 100 instances without any filters, is it possible to get the next 100 instances and so on via OQL query?

谢谢

推荐答案

我在jvisualVm中找不到任何设置来增加尺寸结果集。可能是不可能的那种方式。
它看起来像Jvisualvm代码库中的硬编码限制。参考:

for more on OQL methods ref: http://visualvm.java.net/oqlhelp.html#toHtml

这篇关于增加jvisualVM OQL结果集的最大大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 06:32
查看更多