Object Query Language (OQL) retrieves and analyzes objects and references in a Java heap dump. Its SQL-like queries help investigate cases that are cumbersome to compare manually, such as heap dumps from different app versions. section 11.2.3 section 11.2
Use OQL to inspect heap objects in several ways:
- Select instances of a type, using its fully qualified class name. section 11.2.3
- Project object attributes or derived values, and filter results by a condition. section 11.2.3
- Find unique referrers to instances of a type; a shared referrer can help identify an object preventing garbage collection. section 11.2.3
select { name: p.name, name_length: p.name.value.length}
from model.Product p
where p.name.value.length > 15
This query returns each Product’s name and name length, filtering for names longer than 15 characters. section 11.2.3

