Domanda

I am working on performance tuning of a java rmi application and using OQL to execute below query :

select tpoint.host.value.toString() from sun.rmi.transport.tcp.TCPEndpoint tpoint
where (tpoint.host!=null && tpoint.csf!=null)

Above query successfully compiles on JVisualVM with some records followed by this error :-

Too many results. Please, refine your query.

Same query fails to execute in Eclipse-MAT.

After, removing && tpoint.csf!=null from the above query, it compiles fine in Eclipse-MAT. Also it takes very less time as compared to JVisualVM and displays all records.

I am not able to find the correct syntax for using && operator in Eclipse-MAT.

Facing hard time to find good OQL refrences for Eclipse-MAT, good refrences are appreciated.

Thanks in advance...

È stato utile?

Soluzione 2

There are syntactical diffrences between MAT-Eclipse OQL and JVisualVM OQL.

At the time of writing this answer, it is possible to write more complex queries in JVisualVM OQL (AFAIK) as compared to MAT-Eclipse.

The only drawback is, response time of JViualVM queries is very large, and response does not includes all the records.

It will be great, if MAT developers provides good documentaion of MAT OQL queries (groupby, subquery, string manipulation operators) in the help content.

Altri suggerimenti

Instead of && operator, you can use 'and' to do combined query. Seems that MAT only supports 'and' 'or' 'not', not '&&' '||' '^'.

Below is the working OQL query in MAT.

SELECT tpoint.host.value.toString() FROM sun.rmi.transport.tcp.TCPEndpoint tpoint WHERE ((tpoint.host != null) and (tpoint.csf != null))
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top