A computer-implemented method comprising: - generating a dependency graph for a search definition set, wherein: the search definition set is a collection of search definitions, the search definitions including interpretable text, code, or pseudo-code detailing a search for data against a data source and one or more dependencies with other search definitions in the search definition set, the dependency graph comprises nodes (213a-213n) representing the search definitions (203a-203n) of the search definition set, and the dependency graph indicates dependency between search definitions (203a-203n) in the search definition set; - reducing the dependency graph for a given search definition, wherein the reducing removes search definitions on which the given search definition does not depend, wherein the given search definition is a root of a tree within the dependency graph; - removing elements in the given search definition of the reduced dependency graph based on context criteria; - removing elements in the remaining search definitions of the reduced dependency graph based on search definition criteria; - identifying one or more implementation crux elements in the search definitions of the reduced dependency graph by comparing elements of the search definitions against crux criteria and/or by analyzing elements of the search definitions against their location within the dependency graph, wherein the one or more implementation crux elements are performance-impacting elements including SQL expressions; and - providing the identified one or more implementation crux elements to a code analyzer or optimizer that changes the one or more implementation crux elements to an improved operation or set of operations that are less resource-intensive. - generating a dependency graph for a search definition set, wherein: the search definition set is a collection of search definitions, the search definitions including interpretable text, code, or pseudo-code detailing a search for data against a data source and one or more dependencies with other search definitions in the search definition set, the dependency graph comprises nodes (213a-213n) representing the search definitions (203a-203n) of the search definition set, and the dependency graph indicates dependency between search definitions (203a-203n) in the search definition set; the search definition set is a collection of search definitions, the search definitions including interpretable text, code, or pseudo-code detailing a search for data against a data source and one or more dependencies with other search definitions in the search definition set, the dependency graph comprises nodes (213a-213n) representing the search definitions (203a-203n) of the search definition set, and the dependency graph indicates dependency between search definitions (203a-203n) in the search definition set; - reducing the dependency graph for a given search definition, wherein the reducing removes search definitions on which the given search definition does not depend, wherein the given search definition is a root of a tree within the dependency graph; - removing elements in the given search definition of the reduced dependency graph based on context criteria; - removing elements in the remaining search definitions of the reduced dependency graph based on search definition criteria; - identifying one or more implementation crux elements in the search definitions of the reduced dependency graph by comparing elements of the search definitions against crux criteria and/or by analyzing elements of the search definitions against their location within the dependency graph, wherein the one or more implementation crux elements are performance-impacting elements including SQL expressions; and - providing the identified one or more implementation crux elements to a code analyzer or optimizer that changes the one or more implementation crux elements to an improved operation or set of operations that are less resource-intensive.