1. A method of sharing metadata, at least part of the method implemented using a processor, the method comprising: receiving a plurality of requests to access a resource; creating a program unit for each of the plurality of requests; creating an execution representation of metadata for the resource using the processor, wherein the metadata comprises partitioning information for the resource, and the execution representation of the metadata allows sharing of the metadata without storing multiple copies of instances of the metadata; and sharing the execution representation of the metadata among the plurality of program units.