1. A computer-implemented method, comprising: monitoring, by a processing device, object creation and access in an in-memory data grid; identifying reference data in an object field of a plurality of object instances in the in-memory data grid, each of the plurality of object instances including an instance of the same data value in the object field; creating a reference map for the object field; replicating the reference map across all partitions of the in-memory data grid; storing the reference data in the reference map; updating the object field to identify the reference map; and accessing the reference data using the reference map, wherein upon receiving a query that refers to the object field in an object instance, the accessing includes automatically modifying, by the processing device, a portion of the query to reference the object field in the reference map.